34#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
47G4UEllipticalTube::G4UEllipticalTube(
const G4String& pName,
51 : Base_t(pName, dx, dy, dz)
58G4UEllipticalTube::G4UEllipticalTube(
const G4UEllipticalTube& rhs)
66G4UEllipticalTube& G4UEllipticalTube::operator = (
const G4UEllipticalTube& rhs)
70 if (
this == &rhs) {
return *
this; }
74 Base_t::operator=(rhs);
83G4double G4UEllipticalTube::GetDx()
const
85 return Base_t::GetDx();
88G4double G4UEllipticalTube::GetDy()
const
90 return Base_t::GetDy();
93G4double G4UEllipticalTube::GetDz()
const
95 return Base_t::GetDz();
102void G4UEllipticalTube::SetDx(
G4double dx)
107void G4UEllipticalTube::SetDy(
G4double dy)
112void G4UEllipticalTube::SetDz(
G4double dz)
121G4VSolid* G4UEllipticalTube::Clone()
const
123 return new G4UEllipticalTube(*
this);
137 pMin.
set(-dx,-dy,-dz);
138 pMax.
set( dx, dy, dz);
146G4UEllipticalTube::CalculateExtent(
const EAxis pAxis,
156 BoundingLimits(bmin,bmax);
159 return bbox.CalculateExtent(pAxis,pVoxelLimit, pTransform, pMin, pMax);
161 if (bbox.BoundingBoxVsVoxelLimits(pAxis, pVoxelLimit, pTransform, pMin, pMax))
163 return exist = pMin < pMax;
172 const G4int NSTEPS = 24;
175 G4double sinHalf = std::sin(0.5*ang);
176 G4double cosHalf = std::cos(0.5*ang);
177 G4double sinStep = 2.*sinHalf*cosHalf;
178 G4double cosStep = 1. - 2.*sinHalf*sinHalf;
185 for (
G4int k=0; k<NSTEPS; ++k)
187 baseA[k].set(sx*cosCur,sy*sinCur,-dz);
188 baseB[k].set(sx*cosCur,sy*sinCur, dz);
191 sinCur = sinCur*cosStep + cosCur*sinStep;
192 cosCur = cosCur*cosStep - sinTmp*sinStep;
195 std::vector<const G4ThreeVectorList *> polygons(2);
196 polygons[0] = &baseA;
197 polygons[1] = &baseB;
199 exist = benv.CalculateExtent(pAxis, pVoxelLimit, pTransform, pMin, pMax);
207G4Polyhedron* G4UEllipticalTube::CreatePolyhedron()
const
std::vector< G4ThreeVector > G4ThreeVectorList
CLHEP::Hep3Vector G4ThreeVector
void set(double x, double y, double z)
G4BoundingEnvelope is a helper class to facilitate calculation of the extent of a solid within the li...
G4VSolid is an abstract base class for solids, physical shapes that can be tracked through....
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendic...
HepPolyhedron & Transform(const G4Transform3D &t)