59 :
G4VSolid(pName), fRebuildPolyhedron(false), fpPolyhedron(0)
78 :
G4VSolid(rhs), fPtrSolid(rhs.fPtrSolid),
79 fRebuildPolyhedron(false), fpPolyhedron(0)
91 if (
this == &rhs) {
return *
this; }
113 return G4String(
"G4ReflectedSolid");
158 G4double xmin = pMin.x(), ymin = pMin.y(), zmin = pMin.z();
159 G4double xmax = pMax.x(), ymax = pMax.y(), zmax = pMax.z();
164 if (std::abs(xx) == 1 && std::abs(yy) == 1 && std::abs(zz) == 1)
168 if (xx == -1) {
G4double tmp = -xmin; xmin = -xmax; xmax = tmp; }
169 if (yy == -1) {
G4double tmp = -ymin; ymin = -ymax; ymax = tmp; }
170 if (zz == -1) {
G4double tmp = -zmin; zmin = -zmax; zmax = tmp; }
184 transform3D.getTranslation());
194 pMin.set(xmin,ymin,-zmax);
195 pMax.set(xmax,ymax,-zmin);
199 if (pMin.x() >= pMax.x() || pMin.y() >= pMax.y() || pMin.z() >= pMax.z())
201 std::ostringstream message;
202 message <<
"Bad bounding box (min >= max) for solid: "
204 <<
"\npMin = " << pMin
205 <<
"\npMax = " << pMax;
206 G4Exception(
"G4ReflectedSolid::Extent()",
"GeomMgt0001",
242 transform3D.getTranslation());
252 G4double tmp= -pMin; pMin= -pMax; pMax= tmp;
322 calcNorm, validNorm, &solNorm);
325 *n = (*fDirectTransform3D)*
G4Vector3D(solNorm);
351 G4Exception(
"G4ReflectedSolid::ComputeDimensions()",
353 "Method not applicable in this context!");
383 os <<
"-----------------------------------------------------------\n"
384 <<
" *** Dump for Reflected solid - " <<
GetName() <<
" ***\n"
385 <<
" ===================================================\n"
387 <<
" Parameters of constituent solid: \n"
388 <<
"===========================================================\n";
390 os <<
"===========================================================\n"
391 <<
" Transformations: \n"
392 <<
" Direct transformation - translation : \n"
394 <<
" - rotation : \n"
398 <<
"===========================================================\n";
428 std::ostringstream message;
429 message <<
"Solid - " <<
GetName()
430 <<
" - original solid has no" <<
G4endl
431 <<
"corresponding polyhedron. Returning NULL!";
432 G4Exception(
"G4ReflectedSolid::CreatePolyhedron()",
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const =0
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
G4double GetMinYExtent() const
void SetDirectTransform3D(G4Transform3D &)
CLHEP::Hep3Vector G4ThreeVector
std::ostream & StreamInfo(std::ostream &os) const
G4Polyhedron * GetPolyhedron() const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
EInside Inside(const G4ThreeVector &p) const
HepGeom::Point3D< G4double > G4Point3D
HepGeom::Vector3D< G4double > G4Vector3D
G4ReflectedSolid & operator=(const G4ReflectedSolid &rhs)
virtual void AddSolid(const G4Box &)=0
G4Transform3D * fDirectTransform3D
static double normal(HepRandomEngine *eptr)
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4Transform3D GetTransform3D() const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4double GetMaxXExtent() const
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax)
G4double GetMinZExtent() const
virtual std::ostream & StreamInfo(std::ostream &os) const =0
virtual ~G4ReflectedSolid()
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
virtual G4Polyhedron * CreatePolyhedron() const
virtual G4GeometryType GetEntityType() const
G4VSolid * GetConstituentMovedSolid() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double GetMinXExtent() const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double GetMaxZExtent() const
G4bool fRebuildPolyhedron
virtual G4ThreeVector GetPointOnSurface() const
G4Polyhedron * fpPolyhedron
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
G4double GetMaxYExtent() const
G4VSolid & operator=(const G4VSolid &rhs)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4Polyhedron * CreatePolyhedron() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4ThreeVector GetPointOnSurface() const
virtual void Extent(G4ThreeVector &pMin, G4ThreeVector &pMax) const
G4Transform3D GetDirectTransform3D() const
virtual const G4ReflectedSolid * GetReflectedSolidPtr() const