69 delete fpPolyhedron; fpPolyhedron =
nullptr;
70 delete fScale; fScale =
nullptr;
78 :
G4VSolid (rhs), fPtrSolid(rhs.fPtrSolid),
79 fCubicVolume(rhs.fCubicVolume), fSurfaceArea(rhs.fSurfaceArea)
92 if (
this == &rhs) {
return *
this; }
100 fPtrSolid = rhs.fPtrSolid;
103 fCubicVolume = rhs.fCubicVolume;
104 fSurfaceArea = rhs.fSurfaceArea;
105 fRebuildPolyhedron =
false;
106 delete fpPolyhedron; fpPolyhedron =
nullptr;
131 pMin.
set(bmin.
x()*scale.
x(),bmin.
y()*scale.
y(),bmin.
z()*scale.
z());
132 pMax.
set(bmax.
x()*scale.
x(),bmax.
y()*scale.
y(),bmax.
z()*scale.
z());
136 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
138 std::ostringstream message;
139 message <<
"Bad bounding box (min >= max) for solid: "
141 <<
"\npMin = " << pMin
142 <<
"\npMax = " << pMax;
143 G4Exception(
"G4ScaledSolid::BoundingLimits()",
"GeomMgt0001",
200 return normal/normal.
mag();
218 newDirection = newDirection/newDirection.
mag();
261 newDirection = newDirection/newDirection.
mag();
266 calcNorm,validNorm,&solNorm);
271 *n = normal/normal.
mag();
306 "Method not applicable in this context!");
354 if (fScale !=
nullptr) {
delete fScale; }
356 fRebuildPolyhedron =
true;
365 if(fCubicVolume < 0.)
381 if(fSurfaceArea < 0.)
394 os <<
"-----------------------------------------------------------\n"
395 <<
" *** Dump for Scaled solid - " <<
GetName() <<
" ***\n"
396 <<
" ===================================================\n"
398 <<
" Parameters of constituent solid: \n"
399 <<
"===========================================================\n";
401 os <<
"===========================================================\n"
403 <<
" Scale transformation : \n"
407 <<
"===========================================================\n";
430 if (polyhedron !=
nullptr)
439 "No G4Polyhedron for scaled solid");
450 if (fpPolyhedron ==
nullptr ||
451 fRebuildPolyhedron ||
456 fRebuildPolyhedron =
false;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
void set(double x, double y, double z)
HepRotation inverse() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
G4VSolid * GetUnscaledSolid() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double GetCubicVolume()
G4ScaledSolid & operator=(const G4ScaledSolid &rhs)
G4double GetSurfaceArea()
G4Scale3D GetScaleTransform() const
std::ostream & StreamInfo(std::ostream &os) const
G4ThreeVector GetPointOnSurface() const
EInside Inside(const G4ThreeVector &p) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
void SetScaleTransform(const G4Scale3D &scale)
G4Polyhedron * CreatePolyhedron() const
G4ScaledSolid(const G4String &pName, G4VSolid *pSolid, const G4Scale3D &pScale)
G4GeometryType GetEntityType() const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4Polyhedron * GetPolyhedron() const
void DescribeYourselfTo(G4VGraphicsScene &scene) const
virtual void AddSolid(const G4Box &)=0
virtual std::ostream & StreamInfo(std::ostream &os) const =0
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const =0
virtual G4ThreeVector GetPointOnSurface() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
virtual G4Polyhedron * CreatePolyhedron() const
G4VSolid & operator=(const G4VSolid &rhs)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4double GetCubicVolume()
virtual G4double GetSurfaceArea()
static G4int GetNumberOfRotationSteps()
HepPolyhedron & Transform(const G4Transform3D &t)