85 if (
this == &rhs) {
return *
this; }
107 return {
"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",
241 if (!
fPtrSolid->CalculateExtent(pAxis, limits, transform, pMin, pMax))
247 G4double tmp= -pMin; pMin= -pMax; pMax= tmp;
285 return fPtrSolid->DistanceToIn(newPoint,newDirection);
297 return fPtrSolid->DistanceToIn(newPoint);
317 calcNorm, validNorm, &solNorm);
320 *n = (*fDirectTransform3D)*
G4Vector3D(solNorm);
333 return fPtrSolid->DistanceToOut(newPoint);
346 G4Exception(
"G4ReflectedSolid::ComputeDimensions()",
348 "Method not applicable in this context!");
387 return fPtrSolid->GetNumOfConstituents();
414 os <<
"-----------------------------------------------------------\n"
415 <<
" *** Dump for Reflected solid - " <<
GetName() <<
" ***\n"
416 <<
" ===================================================\n"
418 <<
" Parameters of constituent solid: \n"
419 <<
"===========================================================\n";
421 os <<
"===========================================================\n"
422 <<
" Transformations: \n"
423 <<
" Direct transformation - translation : \n"
425 <<
" - rotation : \n"
429 <<
"===========================================================\n";
452 if (polyhedron !=
nullptr)
457 std::ostringstream message;
458 message <<
"Solid - " <<
GetName()
459 <<
" - original solid has no" <<
G4endl
460 <<
"corresponding polyhedron. Returning NULL!";
461 G4Exception(
"G4ReflectedSolid::CreatePolyhedron()",
474 (
fpPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() !=
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
HepGeom::Point3D< G4double > G4Point3D
CLHEP::Hep3Vector G4ThreeVector
HepGeom::Vector3D< G4double > G4Vector3D
void set(double x, double y, double z)
HepRotation inverse() const
G4bool fRebuildPolyhedron
G4VSolid * Clone() const override
G4GeometryType GetEntityType() const override
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const override
G4Transform3D GetDirectTransform3D() const
G4Polyhedron * fpPolyhedron
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=nullptr, G4ThreeVector *n=nullptr) const override
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const override
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const override
std::ostream & StreamInfo(std::ostream &os) const override
EInside Inside(const G4ThreeVector &p) const override
G4bool IsFaceted() const override
void BoundingLimits(G4ThreeVector &pMin, G4ThreeVector &pMax) const override
G4Polyhedron * CreatePolyhedron() const override
G4Polyhedron * GetPolyhedron() const override
void SetDirectTransform3D(G4Transform3D &)
void DescribeYourselfTo(G4VGraphicsScene &scene) const override
G4Transform3D GetTransform3D() const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep) override
G4VSolid * GetConstituentMovedSolid() const
~G4ReflectedSolid() override
G4double GetCubicVolume() override
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
virtual const G4ReflectedSolid * GetReflectedSolidPtr() const
G4ReflectedSolid & operator=(const G4ReflectedSolid &rhs)
G4int GetNumOfConstituents() const override
G4ThreeVector GetPointOnSurface() const override
G4Transform3D * fDirectTransform3D
G4double GetSurfaceArea() override
virtual void AddSolid(const G4Box &)=0
G4VPVParameterisation ia an abstract base class for Parameterisation, able to compute the transformat...
G4VPhysicalVolume is an abstract base class for the representation of a positioned volume....
G4VSolid(const G4String &name)
G4VSolid & operator=(const G4VSolid &rhs)
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendic...
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
HepPolyhedron & Transform(const G4Transform3D &t)