34#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
50 : Base_t(pName, pdx1, pdx2, pdy1, pdy2, pdz)
59G4UTrd::G4UTrd( __void__& a )
68G4UTrd::~G4UTrd() =
default;
74G4UTrd::G4UTrd(
const G4UTrd& rhs)
83G4UTrd& G4UTrd::operator = (
const G4UTrd& rhs)
87 if (
this == &rhs) {
return *
this; }
91 Base_t::operator=(rhs);
100G4double G4UTrd::GetXHalfLength1()
const
104G4double G4UTrd::GetXHalfLength2()
const
108G4double G4UTrd::GetYHalfLength1()
const
112G4double G4UTrd::GetYHalfLength2()
const
116G4double G4UTrd::GetZHalfLength()
const
121void G4UTrd::SetXHalfLength1(
G4double val)
123 Base_t::SetXHalfLength1(val);
124 fRebuildPolyhedron =
true;
126void G4UTrd::SetXHalfLength2(
G4double val)
128 Base_t::SetXHalfLength2(val);
129 fRebuildPolyhedron =
true;
131void G4UTrd::SetYHalfLength1(
G4double val)
133 Base_t::SetYHalfLength1(val);
134 fRebuildPolyhedron =
true;
136void G4UTrd::SetYHalfLength2(
G4double val)
138 Base_t::SetYHalfLength2(val);
139 fRebuildPolyhedron =
true;
141void G4UTrd::SetZHalfLength(
G4double val)
143 Base_t::SetZHalfLength(val);
144 fRebuildPolyhedron =
true;
149 Base_t::SetAllParameters(pdx1, pdx2, pdy1, pdy2, pdz);
150 fRebuildPolyhedron =
true;
171 return new G4UTrd(*
this);
180 static G4bool checkBBox =
true;
190 pMin.
set(-xmax,-ymax,-dz);
191 pMax.
set( xmax, ymax, dz);
195 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
197 std::ostringstream message;
198 message <<
"Bad bounding box (min >= max) for solid: "
200 <<
"\npMin = " << pMin
201 <<
"\npMax = " << pMax;
202 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
220 std::ostringstream message;
221 message <<
"Inconsistency in bounding boxes for solid: "
223 <<
"\nBBox min: wrapper = " << pMin <<
" solid = " << vmin
224 <<
"\nBBox max: wrapper = " << pMax <<
" solid = " << vmax;
225 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
237G4UTrd::CalculateExtent(
const EAxis pAxis,
247 BoundingLimits(bmin,bmax);
250 if (
true)
return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
252 if (bbox.BoundingBoxVsVoxelLimits(pAxis,pVoxelLimit,pTransform,pMin,pMax))
254 return exist = pMin < pMax;
266 baseA[0].set(-dx1,-dy1,-dz);
267 baseA[1].set( dx1,-dy1,-dz);
268 baseA[2].set( dx1, dy1,-dz);
269 baseA[3].set(-dx1, dy1,-dz);
270 baseB[0].set(-dx2,-dy2, dz);
271 baseB[1].set( dx2,-dy2, dz);
272 baseB[2].set( dx2, dy2, dz);
273 baseB[3].set(-dx2, dy2, dz);
275 std::vector<const G4ThreeVectorList *> polygons(2);
276 polygons[0] = &baseA;
277 polygons[1] = &baseB;
280 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)
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
virtual void ComputeDimensions(G4Box &, const G4int, const G4VPhysicalVolume *) const