52 G4VSolid(name), fShape(s), fRebuildPolyhedron(false), fPolyhedron(0)
57 :
G4VSolid(a), fShape(0), fRebuildPolyhedron(false), fPolyhedron(0)
68 return (
this == &s) ?
true :
false;
86 if (in_temp == VUSolid::EnumInside::eSurface)
return kSurface;
87 if (in_temp == VUSolid::EnumInside::eInside)
return kInside;
150 if(valid){ *validNorm =
true;}
151 else {* validNorm =
false;}
264 G4bool existsAfterClip = false ;
277 if (pVoxelLimit.
IsLimited(pAxis) ==
false)
281 existsAfterClip = true ;
298 existsAfterClip = true ;
333 existsAfterClip = true ;
339 return existsAfterClip;
347 std::ostringstream message;
348 message <<
"Illegal call to G4USolid::ComputeDimensions()" <<
G4endl
349 <<
"Method not overloaded by derived class !";
350 G4Exception(
"G4USolid::ComputeDimensions()",
"GeomSolids0003",
363 return "G4" + string;
372 :
G4VSolid(rhs), fRebuildPolyhedron(false), fPolyhedron(0)
401 std::ostringstream message;
402 message <<
"Clone() method not implemented for type: "
404 <<
"Returning NULL pointer!";
412 G4double xMin, xMax, yMin, yMax, zMin, zMax;
423 vertices->reserve(8);
444 G4Exception(
"G4VUSolid::CreateRotatedVertices()",
"FatalError",
463 return new G4PolyhedronTubs(array[0], array[1], array[2], array[3], array[4]);
469 return new G4PolyhedronCons(array[0], array[1], array[2], array[3], array[4], array[5], array[6]);
481 return new G4PolyhedronSphere(array[0], array[1], array[2], array[3], array[4], array[5]);
489 static int faces[4][4] = {{1, 3, 2, 0}, {1, 4, 3, 0}, {1, 2, 4, 0}, {2, 3, 4, 0}};
490 xyz[0][0] = array[0];
491 xyz[0][1] = array[1];
492 xyz[0][2] = array[2];
493 xyz[1][0] = array[3];
494 xyz[1][1] = array[4];
495 xyz[1][2] = array[5];
496 xyz[2][0] = array[6];
497 xyz[2][1] = array[7];
498 xyz[2][2] = array[8];
499 xyz[3][0] = array[9];
500 xyz[3][1] = array[10];
501 xyz[3][2] = array[11];
503 ph->createPolyhedron(4, 4, xyz, faces);
510 return new G4PolyhedronTrd2(array[0], array[1], array[2], array[3], array[4]);
516 double phi = (array[11] != 1.0) ? (std::atan(array[10] / array[9])) : (0.0);
517 double alpha1 = std::atan(array[4]);
518 double alpha2 = std::atan(array[8]);
519 double theta = std::acos(array[11]);
522 array[1], array[2], array[3], alpha1,
523 array[5], array[6], array[7], alpha2);
virtual UVector3 GetPointOnSurface() const =0
void ClipCrossSection(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4ThreeVectorList * CreateRotatedVertices(const G4AffineTransform &pT) const
virtual UGeometryType GetEntityType() const =0
virtual double SurfaceArea()=0
virtual void DescribeYourselfTo(G4VGraphicsScene &scene) const
static const G4double kInfinity
G4double GetMinYExtent() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
CLHEP::Hep3Vector G4ThreeVector
G4Polyhedron * CreatePolyhedron() const
virtual std::ostream & StreamInfo(std::ostream &os) const
void SetXmax(G4double xmax)
virtual G4double GetCubicVolume()
virtual G4double GetSurfaceArea()
virtual bool Normal(const UVector3 &aPoint, UVector3 &aNormal) const =0
virtual EnumInside Inside(const UVector3 &aPoint) const =0
virtual EInside Inside(const G4ThreeVector &p) const
virtual void AddSolid(const G4Box &)=0
#define G4MUTEX_INITIALIZER
G4bool operator==(const G4USolid &s) const
void SetYmax(G4double ymax)
virtual std::ostream & StreamInfo(std::ostream &os) const =0
G4double GetMaxXExtent() const
virtual G4Polyhedron * GetPolyhedron() const
G4double GetMinZExtent() const
virtual double DistanceToIn(const UVector3 &aPoint, const UVector3 &aDirection, double aPstep=UUtils::kInfinity) const =0
std::vector< G4ThreeVector > G4ThreeVectorList
G4bool fRebuildPolyhedron
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const
virtual double SafetyFromInside(const UVector3 &aPoint, bool aAccurate=false) const =0
G4double GetMinXExtent() const
G4double GetMaxZExtent() const
void SetZmin(G4double zmin)
G4USolid(const G4String &pName, VUSolid *shape)
G4Polyhedron * fPolyhedron
T max(const T t1, const T t2)
brief Return the largest of the two arguments
virtual void ExtentAxis(EAxisType aAxis, double &aMin, double &aMax) const
virtual double SafetyFromOutside(const UVector3 &aPoint, bool aAccurate=false) const =0
virtual G4VisExtent GetExtent() const
G4USolid & operator=(const G4USolid &rhs)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector &p) const
G4double GetMaxYExtent() const
G4VSolid & operator=(const G4VSolid &rhs)
G4int GetNumberOfRotationStepsAtTimeOfCreation() const
virtual double DistanceToOut(const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const =0
void SetZmax(G4double zmax)
virtual VUSolid * Clone() const =0
void SetXmin(G4double xmin)
virtual G4bool CalculateExtent(const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pMin, G4double &pMax) const
G4double GetMaxExtent(const EAxis pAxis) const
void SetYmin(G4double ymin)
virtual G4VSolid * Clone() const
void ClipBetweenSections(G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
G4double GetMinExtent(const EAxis pAxis) const
virtual double Capacity()=0
virtual G4GeometryType GetEntityType() const
virtual void ComputeDimensions(G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
virtual G4ThreeVector GetPointOnSurface() const
virtual void GetParametersList(int aNumber, double *aArray) const =0