34#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
50 : Base_t(pName, pdx1, pdx2, pdy1, pdy2, pdz)
59G4UTrd::G4UTrd( __void__& a )
76G4UTrd::G4UTrd(
const G4UTrd& rhs)
85G4UTrd& G4UTrd::operator = (
const G4UTrd& rhs)
89 if (
this == &rhs) {
return *
this; }
93 Base_t::operator=(rhs);
102G4double G4UTrd::GetXHalfLength1()
const
106G4double G4UTrd::GetXHalfLength2()
const
110G4double G4UTrd::GetYHalfLength1()
const
114G4double G4UTrd::GetYHalfLength2()
const
118G4double G4UTrd::GetZHalfLength()
const
123void G4UTrd::SetXHalfLength1(
G4double val)
125 Base_t::SetXHalfLength1(val);
126 fRebuildPolyhedron =
true;
128void G4UTrd::SetXHalfLength2(
G4double val)
130 Base_t::SetXHalfLength2(val);
131 fRebuildPolyhedron =
true;
133void G4UTrd::SetYHalfLength1(
G4double val)
135 Base_t::SetYHalfLength1(val);
136 fRebuildPolyhedron =
true;
138void G4UTrd::SetYHalfLength2(
G4double val)
140 Base_t::SetYHalfLength2(val);
141 fRebuildPolyhedron =
true;
143void G4UTrd::SetZHalfLength(
G4double val)
145 Base_t::SetZHalfLength(val);
146 fRebuildPolyhedron =
true;
151 Base_t::SetAllParameters(pdx1, pdx2, pdy1, pdy2, pdz);
152 fRebuildPolyhedron =
true;
173 return new G4UTrd(*
this);
182 static G4bool checkBBox =
true;
192 pMin.
set(-xmax,-ymax,-dz);
193 pMax.
set( xmax, ymax, dz);
197 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
199 std::ostringstream message;
200 message <<
"Bad bounding box (min >= max) for solid: "
202 <<
"\npMin = " << pMin
203 <<
"\npMax = " << pMax;
204 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
222 std::ostringstream message;
223 message <<
"Inconsistency in bounding boxes for solid: "
225 <<
"\nBBox min: wrapper = " << pMin <<
" solid = " << vmin
226 <<
"\nBBox max: wrapper = " << pMax <<
" solid = " << vmax;
227 G4Exception(
"G4UTrd::BoundingLimits()",
"GeomMgt0001",
239G4UTrd::CalculateExtent(
const EAxis pAxis,
249 BoundingLimits(bmin,bmax);
252 if (
true)
return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
254 if (bbox.BoundingBoxVsVoxelLimits(pAxis,pVoxelLimit,pTransform,pMin,pMax))
256 return exist = (pMin < pMax) ?
true :
false;
268 baseA[0].set(-dx1,-dy1,-dz);
269 baseA[1].set( dx1,-dy1,-dz);
270 baseA[2].set( dx1, dy1,-dz);
271 baseA[3].set(-dx1, dy1,-dz);
272 baseB[0].set(-dx2,-dy2, dz);
273 baseB[1].set( dx2,-dy2, dz);
274 baseB[2].set( dx2, dy2, dz);
275 baseB[3].set(-dx2, dy2, dz);
277 std::vector<const G4ThreeVectorList *> polygons(2);
278 polygons[0] = &baseA;
279 polygons[1] = &baseB;
282 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