54 :
G4VSolid(pName), fPtrSolid(pSolid),
55 fRebuildPolyhedron(false), fpPolyhedron(0)
66 :
G4VSolid(a), fPtrSolid(0), fScale(0),
67 fRebuildPolyhedron(false), fpPolyhedron(0)
77 delete fpPolyhedron; fpPolyhedron= 0;
78 delete fScale; fScale= 0;
86 :
G4VSolid (rhs), fPtrSolid(rhs.fPtrSolid),
87 fRebuildPolyhedron(false), fpPolyhedron(0)
100 if (
this == &rhs) {
return *
this; }
108 fPtrSolid = rhs.fPtrSolid;
111 fRebuildPolyhedron =
false;
112 delete fpPolyhedron; fpPolyhedron= 0;
135 fPtrSolid->
Extent(bmin,bmax);
136 pMin.
set(bmin.
x()*scale.
x(),bmin.
y()*scale.
y(),bmin.
z()*scale.
z());
137 pMax.
set(bmax.
x()*scale.
x(),bmax.
y()*scale.
y(),bmax.
z()*scale.
z());
141 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
143 std::ostringstream message;
144 message <<
"Bad bounding box (min >= max) for solid: "
146 <<
"\npMin = " << pMin
147 <<
"\npMax = " << pMax;
148 G4Exception(
"G4ScaledSolid::Extent()",
"GeomMgt0001",
167 fPtrSolid->
Extent(bmin,bmax);
205 return normal/normal.
mag();
223 newDirection = newDirection/newDirection.
mag();
266 newDirection = newDirection/newDirection.
mag();
271 calcNorm,validNorm,&solNorm);
276 *n = normal/normal.
mag();
311 "Method not applicable in this context!");
359 if (fScale) {
delete fScale; }
361 fRebuildPolyhedron =
true;
370 os <<
"-----------------------------------------------------------\n"
371 <<
" *** Dump for Scaled solid - " <<
GetName() <<
" ***\n"
372 <<
" ===================================================\n"
374 <<
" Parameters of constituent solid: \n"
375 <<
"===========================================================\n";
377 os <<
"===========================================================\n"
379 <<
" Scale transformation : \n"
383 <<
"===========================================================\n";
417 fRebuildPolyhedron ||
422 fRebuildPolyhedron =
false;
void set(double x, double y, double z)
G4ScaledSolid & operator=(const G4ScaledSolid &rhs)
G4ThreeVector GetPointOnSurface() const
G4Scale3D GetScaleTransform() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
std::vector< ExP01TrackerHit * > a
HepPolyhedron & Transform(const G4Transform3D &t)
virtual void AddSolid(const G4Box &)=0
HepRotation inverse() const
static double normal(HepRandomEngine *eptr)
G4Polyhedron * CreatePolyhedron() const
virtual std::ostream & StreamInfo(std::ostream &os) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4Polyhedron * CreatePolyhedron() const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
EInside Inside(const G4ThreeVector &p) const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4Polyhedron * GetPolyhedron() const
void DescribeYourselfTo(G4VGraphicsScene &scene) const
static G4int GetNumberOfRotationSteps()
virtual G4ThreeVector GetPointOnSurface() const
void SetScaleTransform(const G4Scale3D &scale)
G4VSolid * GetUnscaledSolid() const
std::ostream & StreamInfo(std::ostream &os) const
G4VSolid & operator=(const G4VSolid &rhs)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4ScaledSolid(const G4String &pName, G4VSolid *pSolid, const G4Scale3D &pScale)
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
virtual void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4GeometryType GetEntityType() const