35 #if defined(G4GEOM_USE_USOLIDS)
48 : G4USolid(name, new UMultiUnion(name))
58 G4UMultiUnion::G4UMultiUnion(__void__&
a)
68 G4UMultiUnion::~G4UMultiUnion()
77 G4UMultiUnion::G4UMultiUnion(
const G4UMultiUnion &source)
87 G4UMultiUnion& G4UMultiUnion::operator=(
const G4UMultiUnion &source)
89 if (
this == &source)
return *
this;
91 G4USolid::operator=( source );
111 tr.fRot[0] = rot.
xx(); tr.fRot[1] = rot.
xy(); tr.fRot[2] = rot.
xz();
112 tr.fRot[3] = rot.
yx(); tr.fRot[4] = rot.
yy(); tr.fRot[5] = rot.
yz();
113 tr.fRot[6] = rot.
zx(); tr.fRot[7] = rot.
zy(); tr.fRot[8] = rot.
zz();
114 tr.fTr = UVector3(pos.
x(), pos.
y(), pos.
z());
116 GetShape()->AddNode(*(static_cast<G4USolid&>(solid).GetSolid()), tr);
121 UTransform3D tr = GetShape()->GetTransformation(index);
125 tr.fRot[3], tr.fRot[4], tr.fRot[5],
126 tr.fRot[6], tr.fRot[7], tr.fRot[8]));
134 VUSolid* solid = GetShape()->GetSolid(index);
135 return new G4USolid(solid->GetName(), solid);
138 G4int G4UMultiUnion::GetNumberOfSolids()
const
140 return GetShape()->GetNumberOfSolids();
143 void G4UMultiUnion::Voxelize()
145 GetShape()->Voxelize();
155 GetShape()->
Extent(vmin,vmax);
156 pMin.
set(vmin.x(),vmin.y(),vmin.z());
157 pMax.
set(vmax.x(),vmax.y(),vmax.z());
161 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
163 std::ostringstream message;
164 message <<
"Bad bounding box (min >= max) for solid: "
166 <<
"\npMin = " << pMin
167 <<
"\npMax = " << pMax;
178 G4UMultiUnion::CalculateExtent(
const EAxis pAxis,
190 return bbox.CalculateExtent(pAxis,pVoxelLimit,pTransform,pMin,pMax);
206 const G4ThreeVector transl0 = (*transform0).getTranslation();
212 for(
G4int i=1; i<GetNumberOfSolids(); ++i)
220 processor.
push_back (operation, *operand);
224 if (processor.
execute(*top)) {
return top; }
228 #endif // G4GEOM_USE_USOLIDS
void set(double x, double y, double z)
std::vector< ExP01TrackerHit * > a
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)
void push_back(Operation, const HepPolyhedron &)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
bool execute(HepPolyhedron &)
static const G4double pos