43 #ifndef G4UPOLYHEDRA_HH
44 #define G4UPOLYHEDRA_HH
48 #if defined(G4GEOM_USE_USOLIDS)
50 #include "UPolyhedra.hh"
58 class G4UPolyhedra :
public G4USolid
87 inline UPolyhedra* GetShape()
const;
89 inline G4int GetNumSide()
const;
92 inline G4bool IsOpen()
const;
93 inline G4bool IsGeneric()
const;
94 inline G4int GetNumRZCorner()
const;
103 G4UPolyhedra(__void__&);
108 G4UPolyhedra(
const G4UPolyhedra &source );
109 G4UPolyhedra &operator=(
const G4UPolyhedra &source );
118 inline UPolyhedra* G4UPolyhedra::GetShape()
const
120 return (UPolyhedra*) fShape;
123 inline G4int G4UPolyhedra::GetNumSide()
const
125 return GetShape()->GetNumSide();
127 inline G4double G4UPolyhedra::GetStartPhi()
const
129 return GetShape()->GetStartPhi();
131 inline G4double G4UPolyhedra::GetEndPhi()
const
133 return GetShape()->GetEndPhi();
135 inline G4bool G4UPolyhedra::IsOpen()
const
137 return GetShape()->IsOpen();
139 inline G4bool G4UPolyhedra::IsGeneric()
const
141 return GetShape()->IsGeneric();
143 inline G4int G4UPolyhedra::GetNumRZCorner()
const
145 return GetShape()->GetNumRZCorner();
149 UPolyhedraSideRZ pside = GetShape()->GetCorner(index);
156 UPolyhedraHistorical* pars = GetShape()->GetOriginalParameters();
160 pdata->
numSide = pars->fNumSide;
161 for (
G4int i=0; i<pars->fNumZPlanes; ++i)
163 pdata->
Z_values[i] = pars->fZValues[i];
164 pdata->
Rmin[i] = pars->Rmin[i];
165 pdata->
Rmax[i] = pars->Rmax[i];
171 UPolyhedraHistorical* pdata = GetShape()->GetOriginalParameters();
174 pdata->fNumSide = pars->
numSide;
176 for (
G4int i=0; i<pdata->fNumZPlanes; ++i)
178 pdata->fZValues[i] = pars->
Z_values[i];
179 pdata->Rmin[i] = pars->
Rmin[i];
180 pdata->Rmax[i] = pars->
Rmax[i];
182 fRebuildPolyhedron =
true;
184 inline G4bool G4UPolyhedra::Reset()
186 return GetShape()->Reset();
189 #endif // G4GEOM_USE_USOLIDS