98 :
G4VSolid(rhs), fPtrSolid(rhs.fPtrSolid), fpPolyhedron(0)
113 if (
this == &rhs) {
return *
this; }
139 return G4String(
"G4ReflectedSolid");
278 G4double x1 = -kInfinity, x2 = kInfinity,
279 y1 = -kInfinity, y2 = kInfinity,
280 z1 = -kInfinity, z2 = kInfinity;
282 G4bool existsAfterClip = false ;
290 existsAfterClip =
false;
297 G4Transform3D transform3D = pTransform3D*(*fDirectTransform3D);
307 vertices->reserve(8);
310 tmpPoint = transform3D*
G4Point3D(vertex0);
312 vertices->push_back(vertex0);
315 tmpPoint = transform3D*
G4Point3D(vertex1);
317 vertices->push_back(vertex1);
320 tmpPoint = transform3D*
G4Point3D(vertex2);
322 vertices->push_back(vertex2);
325 tmpPoint = transform3D*
G4Point3D(vertex3);
327 vertices->push_back(vertex3);
330 tmpPoint = transform3D*
G4Point3D(vertex4);
332 vertices->push_back(vertex4);
335 tmpPoint = transform3D*
G4Point3D(vertex5);
337 vertices->push_back(vertex5);
340 tmpPoint = transform3D*
G4Point3D(vertex6);
342 vertices->push_back(vertex6);
345 tmpPoint = transform3D*
G4Point3D(vertex7);
347 vertices->push_back(vertex7);
354 "Error in allocation of vertices. Out of memory !");
361 if (pVoxelLimit.
IsLimited(pAxis) ==
false)
363 if ( pMin != kInfinity || pMax != -kInfinity )
365 existsAfterClip = true ;
380 if ( pMin != kInfinity || pMax != -kInfinity )
382 existsAfterClip = true ;
415 existsAfterClip = true ;
421 return existsAfterClip;
467 newDirection.
unit() ;
501 newDirection.
unit() ;
507 calcNorm, validNorm, &solNorm) ;
539 G4Exception(
"G4ReflectedSolid::ComputeDimensions()",
541 "Method not applicable in this context!");
573 os <<
"-----------------------------------------------------------\n"
574 <<
" *** Dump for Reflected solid - " <<
GetName() <<
" ***\n"
575 <<
" ===================================================\n"
577 <<
" Parameters of constituent solid: \n"
578 <<
"===========================================================\n";
580 os <<
"===========================================================\n"
581 <<
" Transformations: \n"
582 <<
" Direct transformation - translation : \n"
584 <<
" - rotation : \n"
588 <<
"===========================================================\n";
618 std::ostringstream message;
619 message <<
"Solid - " <<
GetName()
620 <<
" - original solid has no" <<
G4endl
621 <<
"corresponding polyhedron. Returning NULL!";
622 G4Exception(
"G4ReflectedSolid::CreatePolyhedron()",
HepGeom::Point3D< G4double > G4Point3D
CLHEP::Hep3Vector G4ThreeVector
std::vector< G4ThreeVector > G4ThreeVectorList
std::ostream & print(std::ostream &os) const
HepRotation inverse() const
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
EInside Inside(const G4ThreeVector &p) const
G4AffineTransform * fDirectTransform
void DescribeYourselfTo(G4VGraphicsScene &scene) const
G4Transform3D * fPtrTransform3D
std::ostream & StreamInfo(std::ostream &os) const
void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
G4NURBS * CreateNURBS() const
void SetFrameRotation(const G4RotationMatrix &)
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
G4AffineTransform GetDirectTransform() const
G4ThreeVector GetObjectTranslation() const
G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
G4RotationMatrix GetObjectRotation() const
G4Polyhedron * GetPolyhedron() const
G4Polyhedron * CreatePolyhedron() const
G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
void SetTransform(G4AffineTransform &)
void SetDirectTransform3D(G4Transform3D &)
G4Transform3D GetTransform3D() const
G4ThreeVector GetFrameTranslation() const
G4ThreeVector GetPointOnSurface() const
G4VSolid * GetConstituentMovedSolid() const
void SetDirectTransform(G4AffineTransform &)
void SetTransform3D(G4Transform3D &)
G4ReflectedSolid(const G4String &pName, G4VSolid *pSolid, const G4Transform3D &transform)
G4RotationMatrix GetFrameRotation() const
virtual const G4ReflectedSolid * GetReflectedSolidPtr() const
G4ReflectedSolid & operator=(const G4ReflectedSolid &rhs)
void SetFrameTranslation(const G4ThreeVector &)
void SetObjectRotation(const G4RotationMatrix &)
G4Transform3D * fDirectTransform3D
G4AffineTransform GetTransform() const
void SetObjectTranslation(const G4ThreeVector &)
G4AffineTransform * fPtrTransform
virtual ~G4ReflectedSolid()
virtual void AddSolid(const G4Box &)=0
virtual std::ostream & StreamInfo(std::ostream &os) const =0
void ClipBetweenSections(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
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=0, G4ThreeVector *n=0) const =0
virtual G4ThreeVector GetPointOnSurface() const
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const =0
virtual G4Polyhedron * CreatePolyhedron() const
G4VSolid & operator=(const G4VSolid &rhs)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
void ClipCrossSection(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4double GetMinExtent(const EAxis pAxis) const
G4double GetMinZExtent() const
G4double GetMaxExtent(const EAxis pAxis) const
G4double GetMaxYExtent() const
G4double GetMaxZExtent() const
G4double GetMinYExtent() const
G4double GetMinXExtent() const
G4double GetMaxXExtent() const
BasicVector3D< T > unit() const
static G4int GetNumberOfRotationSteps()
HepPolyhedron & Transform(const G4Transform3D &t)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)