73 :
G4VSolid(rhs), fPtrSolid(rhs.fPtrSolid)
85 if (
this == &rhs) {
return *
this; }
107 return G4String(
"G4ReflectedSolid");
153 G4double xmin = pMin.
x(), ymin = pMin.
y(), zmin = pMin.
z();
154 G4double xmax = pMax.
x(), ymax = pMax.
y(), zmax = pMax.
z();
159 if (std::abs(xx) == 1 && std::abs(yy) == 1 && std::abs(zz) == 1)
163 if (xx == -1) {
G4double tmp = -xmin; xmin = -xmax; xmax = tmp; }
164 if (yy == -1) {
G4double tmp = -ymin; ymin = -ymax; ymax = tmp; }
165 if (zz == -1) {
G4double tmp = -zmin; zmin = -zmax; zmax = tmp; }
189 pMin.
set(xmin,ymin,-zmax);
190 pMax.
set(xmax,ymax,-zmin);
194 if (pMin.
x() >= pMax.
x() || pMin.
y() >= pMax.
y() || pMin.
z() >= pMax.
z())
196 std::ostringstream message;
197 message <<
"Bad bounding box (min >= max) for solid: "
199 <<
"\npMin = " << pMin
200 <<
"\npMax = " << pMax;
201 G4Exception(
"G4ReflectedSolid::BoundingLimits()",
"GeomMgt0001",
247 G4double tmp= -pMin; pMin= -pMax; pMax= tmp;
317 calcNorm, validNorm, &solNorm);
320 *n = (*fDirectTransform3D)*
G4Vector3D(solNorm);
346 G4Exception(
"G4ReflectedSolid::ComputeDimensions()",
348 "Method not applicable in this context!");
396 os <<
"-----------------------------------------------------------\n"
397 <<
" *** Dump for Reflected solid - " <<
GetName() <<
" ***\n"
398 <<
" ===================================================\n"
400 <<
" Parameters of constituent solid: \n"
401 <<
"===========================================================\n";
403 os <<
"===========================================================\n"
404 <<
" Transformations: \n"
405 <<
" Direct transformation - translation : \n"
407 <<
" - rotation : \n"
411 <<
"===========================================================\n";
434 if (polyhedron !=
nullptr)
441 std::ostringstream message;
442 message <<
"Solid - " <<
GetName()
443 <<
" - original solid has no" <<
G4endl
444 <<
"corresponding polyhedron. Returning NULL!";
445 G4Exception(
"G4ReflectedSolid::CreatePolyhedron()",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
HepGeom::Point3D< G4double > G4Point3D
HepGeom::Vector3D< G4double > G4Vector3D
void set(double x, double y, double z)
std::ostream & print(std::ostream &os) const
HepRotation inverse() const
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
EInside Inside(const G4ThreeVector &p) const
G4bool fRebuildPolyhedron
void DescribeYourselfTo(G4VGraphicsScene &scene) const
std::ostream & StreamInfo(std::ostream &os) const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4GeometryType GetEntityType() const
G4Transform3D GetDirectTransform3D() const
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4Polyhedron * fpPolyhedron
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4double GetSurfaceArea()
G4Polyhedron * GetPolyhedron() const
G4Polyhedron * CreatePolyhedron() const
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4double GetCubicVolume()
void SetDirectTransform3D(G4Transform3D &)
G4Transform3D GetTransform3D() const
G4ThreeVector GetPointOnSurface() const
G4VSolid * GetConstituentMovedSolid() const
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
virtual const G4ReflectedSolid * GetReflectedSolidPtr() const
G4ReflectedSolid & operator=(const G4ReflectedSolid &rhs)
G4Transform3D * fDirectTransform3D
virtual ~G4ReflectedSolid()
virtual void AddSolid(const G4Box &)=0
virtual std::ostream & StreamInfo(std::ostream &os) const =0
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) 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()
G4double GetMinZExtent() const
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4double GetMaxXExtent() const
static G4int GetNumberOfRotationSteps()
HepPolyhedron & Transform(const G4Transform3D &t)