34#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
50 : Base_t(pName, pdx1, pdx2, pdy1, pdy2, pdz)
58G4UTrd::G4UTrd(
const G4UTrd& rhs)
67G4UTrd& G4UTrd::operator = (
const G4UTrd& rhs)
71 if (
this == &rhs) {
return *
this; }
75 Base_t::operator=(rhs);
84G4double G4UTrd::GetXHalfLength1()
const
88G4double G4UTrd::GetXHalfLength2()
const
92G4double G4UTrd::GetYHalfLength1()
const
96G4double G4UTrd::GetYHalfLength2()
const
100G4double G4UTrd::GetZHalfLength()
const
105void G4UTrd::SetXHalfLength1(
G4double val)
107 Base_t::SetXHalfLength1(val);
108 fRebuildPolyhedron =
true;
110void G4UTrd::SetXHalfLength2(
G4double val)
112 Base_t::SetXHalfLength2(val);
113 fRebuildPolyhedron =
true;
115void G4UTrd::SetYHalfLength1(
G4double val)
117 Base_t::SetYHalfLength1(val);
118 fRebuildPolyhedron =
true;
120void G4UTrd::SetYHalfLength2(
G4double val)
122 Base_t::SetYHalfLength2(val);
123 fRebuildPolyhedron =
true;
125void G4UTrd::SetZHalfLength(
G4double val)
127 Base_t::SetZHalfLength(val);
128 fRebuildPolyhedron =
true;
133 Base_t::SetAllParameters(pdx1, pdx2, pdy1, pdy2, pdz);
134 fRebuildPolyhedron =
true;
155 return new G4UTrd(*
this);
164 static G4bool checkBBox =
true;
174 pMin.
set(-xmax,-ymax,-dz);
175 pMax.
set( xmax, ymax, dz);
179 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
181 std::ostringstream message;
182 message <<
"Bad bounding box (min >= max) for solid: "
184 <<
"\npMin = " << pMin
185 <<
"\npMax = " << pMax;
186 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
204 std::ostringstream message;
205 message <<
"Inconsistency in bounding boxes for solid: "
207 <<
"\nBBox min: wrapper = " << pMin <<
" solid = " << vmin
208 <<
"\nBBox max: wrapper = " << pMax <<
" solid = " << vmax;
209 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
221G4UTrd::CalculateExtent(
const EAxis pAxis,
231 BoundingLimits(bmin,bmax);
234 if (
true)
return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
236 if (bbox.BoundingBoxVsVoxelLimits(pAxis,pVoxelLimit,pTransform,pMin,pMax))
238 return exist = pMin < pMax;
250 baseA[0].set(-dx1,-dy1,-dz);
251 baseA[1].set( dx1,-dy1,-dz);
252 baseA[2].set( dx1, dy1,-dz);
253 baseA[3].set(-dx1, dy1,-dz);
254 baseB[0].set(-dx2,-dy2, dz);
255 baseB[1].set( dx2,-dy2, dz);
256 baseB[2].set( dx2, dy2, dz);
257 baseB[3].set(-dx2, dy2, dz);
259 std::vector<const G4ThreeVectorList *> polygons(2);
260 polygons[0] = &baseA;
261 polygons[1] = &baseB;
264 exist = benv.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
const G4double kCarTolerance
std::vector< G4ThreeVector > G4ThreeVectorList
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
CLHEP::Hep3Vector G4ThreeVector
G4GLOB_DLL std::ostream G4cout
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...
G4Trd is a trapezoid with the X and Y dimensions varying along Z.
G4VPVParameterisation ia an abstract base class for Parameterisation, able to compute the transformat...
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
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...