45 G4VSolid(name), fShape(s), fPolyhedron(0)
50 :
G4VSolid(a), fShape(0), fPolyhedron(0)
60 return (
this == &s) ?
true :
false;
103 if (dist > kInfinity) dist = kInfinity;
114 if (dist > kInfinity) dist = kInfinity;
137 if(valid){ *validNorm =
true;}
138 else {* validNorm =
false;}
145 if (dist > kInfinity) dist = kInfinity;
251 G4bool existsAfterClip = false ;
264 if (pVoxelLimit.
IsLimited(pAxis) ==
false)
266 if ((pMin != kInfinity) || (pMax != -kInfinity))
268 existsAfterClip = true ;
283 if ((pMin != kInfinity) || (pMax != -kInfinity))
285 existsAfterClip = true ;
320 existsAfterClip = true ;
326 return existsAfterClip;
338 return "G4" + string;
343 os <<
"-----------------------------------------------------------\n"
344 <<
" *** Dump for solid - " <<
fShape->
GetName() <<
" ***\n";
353 :
G4VSolid(rhs), fShape(rhs.fShape), fPolyhedron(rhs.fPolyhedron)
385 G4double xMin, xMax, yMin, yMax, zMin, zMax;
396 vertices->reserve(8);
417 G4Exception(
"G4VUSolid::CreateRotatedVertices()",
"FatalError",
436 return new G4PolyhedronTubs(array[0], array[1], array[2], array[3], array[4]);
442 return new G4PolyhedronCons(array[0], array[1], array[2], array[3], array[4], array[5], array[6]);
454 return new G4PolyhedronSphere(array[0], array[1], array[2], array[3], array[4], array[5]);
462 static int faces[4][4] = {{1, 3, 2, 0}, {1, 4, 3, 0}, {1, 2, 4, 0}, {2, 3, 4, 0}};
463 xyz[0][0] = array[0];
464 xyz[0][1] = array[1];
465 xyz[0][2] = array[2];
466 xyz[1][0] = array[3];
467 xyz[1][1] = array[4];
468 xyz[1][2] = array[5];
469 xyz[2][0] = array[6];
470 xyz[2][1] = array[7];
471 xyz[2][2] = array[8];
472 xyz[3][0] = array[9];
473 xyz[3][1] = array[10];
474 xyz[3][2] = array[11];
483 return new G4PolyhedronTrd2(array[0], array[1], array[2], array[3], array[4]);
489 double phi = (array[11] != 1.0) ? (std::atan(array[10] / array[9])) : (0.0);
490 double alpha1 = std::atan(array[4]);
491 double alpha2 = std::atan(array[8]);
492 double theta = std::acos(array[11]);
495 array[1], array[2], array[3], alpha1,
496 array[5], array[6], array[7], alpha2);
538 if (fPolyhedron)
delete fPolyhedron;
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
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
const std::string & GetName() const
G4int createPolyhedron(G4int Nnodes, G4int Nfaces, const G4double xyz[][3], const G4int faces[][4])
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
G4bool operator==(const G4USolid &s) const
void SetYmax(G4double ymax)
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
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)
virtual void ResetPolyhedron() const
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)
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 G4ThreeVector GetPointOnSurface() const
virtual void GetParametersList(int aNumber, double *aArray) const =0