35 #if defined(G4GEOM_USE_USOLIDS)
46 : G4USolid(name, new UMultiUnion(name))
56 G4UMultiUnion::G4UMultiUnion(__void__&
a)
66 G4UMultiUnion::~G4UMultiUnion()
75 G4UMultiUnion::G4UMultiUnion(
const G4UMultiUnion &source)
85 G4UMultiUnion& G4UMultiUnion::operator=(
const G4UMultiUnion &source)
87 if (
this == &source)
return *
this;
89 G4USolid::operator=( source );
101 HepGeom::Rotate3D rot;
102 HepGeom::Translate3D transl ;
103 HepGeom::Scale3D scale;
105 trans.getDecomposition(scale,rot,transl);
109 tr.fRot[0] = rot.xx(); tr.fRot[1] = rot.xy(); tr.fRot[2] = rot.xz();
110 tr.fRot[3] = rot.yx(); tr.fRot[4] = rot.yy(); tr.fRot[5] = rot.yz();
111 tr.fRot[6] = rot.zx(); tr.fRot[7] = rot.zy(); tr.fRot[8] = rot.zz();
112 tr.fTr = UVector3(pos.x(), pos.y(), pos.z());
114 GetShape()->AddNode(*(static_cast<G4USolid&>(solid).GetSolid()), tr);
119 UTransform3D tr = GetShape()->GetTransformation(index);
122 rot(CLHEP::HepRep3x3(tr.fRot[0], tr.fRot[1], tr.fRot[2],
123 tr.fRot[3], tr.fRot[4], tr.fRot[5],
124 tr.fRot[6], tr.fRot[7], tr.fRot[8]));
132 VUSolid* solid = GetShape()->GetSolid(index);
133 return new G4USolid(solid->GetName(), solid);
136 G4int G4UMultiUnion::GetNumberOfSolids()
const
138 return GetShape()->GetNumberOfSolids();
141 void G4UMultiUnion::Voxelize()
143 GetShape()->Voxelize();
155 HepPolyhedronProcessor::Operation operation = HepPolyhedronProcessor::UNION;
160 const G4ThreeVector transl0 = (*transform0).getTranslation();
166 for(
G4int i=1; i<GetNumberOfSolids(); ++i)
174 processor.push_back (operation, *operand);
178 if (processor.execute(*top)) {
return top; }
182 #endif // G4GEOM_USE_USOLIDS
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
static int operand(pchar begin, pchar end, double &result, pchar &endp, const dic_type &dictionary)
static const G4double pos