43 #ifndef G4UEXTRUDEDSOLID_hh
44 #define G4UEXTRUDEDSOLID_hh
48 #if defined(G4GEOM_USE_USOLIDS)
50 #include "UExtrudedSolid.hh"
53 class G4UExtrudedSolid :
public G4USolid
60 : fZ(z), fOffset(offset), fScale(scale) {}
61 ZSection(
const UExtrudedSolid::ZSection& zs)
62 : fZ(zs.fZ), fOffset(
G4TwoVector(zs.fOffset.
x,zs.fOffset.y)),
72 G4UExtrudedSolid(
const G4String& pName,
73 std::vector<G4TwoVector> polygon,
74 std::vector<ZSection> zsections);
77 G4UExtrudedSolid(
const G4String& pName,
78 std::vector<G4TwoVector> polygon,
86 inline UExtrudedSolid* GetShape()
const;
88 inline G4int GetNofVertices()
const;
90 inline std::vector<G4TwoVector> GetPolygon()
const;
91 inline G4int GetNofZSections()
const;
92 inline ZSection GetZSection(
G4int index)
const;
93 inline std::vector<ZSection> GetZSections()
const;
97 G4UExtrudedSolid(__void__&);
102 G4UExtrudedSolid(
const G4UExtrudedSolid& source );
103 G4UExtrudedSolid &operator=(
const G4UExtrudedSolid& source);
111 inline UExtrudedSolid* G4UExtrudedSolid::GetShape()
const
113 return (UExtrudedSolid*) fShape;
116 inline G4int G4UExtrudedSolid::GetNofVertices()
const
118 return GetShape()->GetNofVertices();
122 UVector2 v = GetShape()->GetVertex(i);
125 inline std::vector<G4TwoVector> G4UExtrudedSolid::GetPolygon()
const
127 std::vector<UVector2> pol = GetShape()->GetPolygon();
128 std::vector<G4TwoVector> v;
129 for (
unsigned int i=0; i<pol.size(); ++i)
135 inline G4int G4UExtrudedSolid::GetNofZSections()
const
137 return GetShape()->GetNofZSections();
139 inline G4UExtrudedSolid::ZSection G4UExtrudedSolid::GetZSection(
G4int i)
const
141 return ZSection(GetShape()->GetZSection(i));
143 inline std::vector<G4UExtrudedSolid::ZSection> G4UExtrudedSolid::GetZSections()
const
145 std::vector<UExtrudedSolid::ZSection> sv = GetShape()->GetZSections();
146 std::vector<G4UExtrudedSolid::ZSection> vec;
147 for (
unsigned int i=0; i<sv.size(); ++i)
149 vec.push_back(ZSection(sv[i]));
154 #endif // G4GEOM_USE_USOLIDS
const G4double x[NPOINTSGL]
CLHEP::Hep2Vector G4TwoVector