43 #ifndef G4UMULTIUNION_HH
44 #define G4UMULTIUNION_HH
46 #include <CLHEP/Vector/Rotation.h>
48 #if defined(G4GEOM_USE_USOLIDS)
51 #include "UMultiUnion.hh"
54 #include "HepPolyhedronProcessor.h"
56 class G4UMultiUnion :
public G4USolid
63 inline UMultiUnion* GetShape()
const;
69 inline int GetNumberOfSolids()
const;
70 inline void Voxelize();
73 G4UMultiUnion(__void__&);
78 G4UMultiUnion(
const G4UMultiUnion& source );
79 G4UMultiUnion& operator=(
const G4UMultiUnion& source);
90 inline UMultiUnion* G4UMultiUnion::GetShape()
const
92 return (UMultiUnion*) fShape;
97 HepGeom::Rotate3D rot;
98 HepGeom::Translate3D transl ;
99 HepGeom::Scale3D scale;
101 trans.getDecomposition(scale,rot,transl);
105 tr.fRot[0] = rot.xx(); tr.fRot[1] = rot.xy(); tr.fRot[2] = rot.xz();
106 tr.fRot[3] = rot.yx(); tr.fRot[4] = rot.yy(); tr.fRot[5] = rot.yz();
107 tr.fRot[6] = rot.zx(); tr.fRot[7] = rot.zy(); tr.fRot[8] = rot.zz();
108 tr.fTr = UVector3(pos.x(), pos.y(), pos.z());
110 GetShape()->AddNode(*(static_cast<G4USolid&>(solid).GetSolid()), tr);
115 UTransform3D tr = GetShape()->GetTransformation(index);
118 rot(CLHEP::HepRep3x3(tr.fRot[0], tr.fRot[1], tr.fRot[2],
119 tr.fRot[3], tr.fRot[4], tr.fRot[5],
120 tr.fRot[6], tr.fRot[7], tr.fRot[8]));
128 VUSolid* solid = GetShape()->GetSolid(index);
129 return new G4USolid(solid->GetName(), solid);
132 inline int G4UMultiUnion::GetNumberOfSolids()
const
134 return GetShape()->GetNumberOfSolids();
137 inline void G4UMultiUnion::Voxelize()
139 GetShape()->Voxelize();
142 #endif // G4GEOM_USE_USOLIDS
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
static const G4double pos