52 G4VSolid(name), fShape(s), fRebuildPolyhedron(false), fPolyhedron(0)
57 :
G4VSolid(a), fShape(0), fRebuildPolyhedron(false), fPolyhedron(0)
68 return (
this == &s) ?
true :
false;
145 if(valid){ *validNorm =
true;}
146 else {* validNorm =
false;}
259 G4bool existsAfterClip = false ;
272 if (pVoxelLimit.
IsLimited(pAxis) ==
false)
276 existsAfterClip = true ;
293 existsAfterClip = true ;
328 existsAfterClip = true ;
334 return existsAfterClip;
342 std::ostringstream message;
343 message <<
"Illegal call to G4USolid::ComputeDimensions()" <<
G4endl
344 <<
"Method not overloaded by derived class !";
345 G4Exception(
"G4USolid::ComputeDimensions()",
"GeomSolids0003",
358 return "G4" + string;
363 os <<
"-----------------------------------------------------------\n"
364 <<
" *** Dump for solid - " <<
fShape->
GetName() <<
" ***\n";
373 :
G4VSolid(rhs), fRebuildPolyhedron(false), fPolyhedron(0)
402 std::ostringstream message;
403 message <<
"Clone() method not implemented for type: "
405 <<
"Returning NULL pointer!";
413 G4double xMin, xMax, yMin, yMax, zMin, zMax;
424 vertices->reserve(8);
445 G4Exception(
"G4VUSolid::CreateRotatedVertices()",
"FatalError",
464 return new G4PolyhedronTubs(array[0], array[1], array[2], array[3], array[4]);
470 return new G4PolyhedronCons(array[0], array[1], array[2], array[3], array[4], array[5], array[6]);
482 return new G4PolyhedronSphere(array[0], array[1], array[2], array[3], array[4], array[5]);
490 static int faces[4][4] = {{1, 3, 2, 0}, {1, 4, 3, 0}, {1, 2, 4, 0}, {2, 3, 4, 0}};
491 xyz[0][0] = array[0];
492 xyz[0][1] = array[1];
493 xyz[0][2] = array[2];
494 xyz[1][0] = array[3];
495 xyz[1][1] = array[4];
496 xyz[1][2] = array[5];
497 xyz[2][0] = array[6];
498 xyz[2][1] = array[7];
499 xyz[2][2] = array[8];
500 xyz[3][0] = array[9];
501 xyz[3][1] = array[10];
502 xyz[3][2] = array[11];
504 ph->createPolyhedron(4, 4, xyz, faces);
511 return new G4PolyhedronTrd2(array[0], array[1], array[2], array[3], array[4]);
517 double phi = (array[11] != 1.0) ? (std::atan(array[10] / array[9])) : (0.0);
518 double alpha1 = std::atan(array[4]);
519 double alpha2 = std::atan(array[8]);
520 double theta = std::acos(array[11]);
523 array[1], array[2], array[3], alpha1,
524 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
const std::string & GetName() 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)
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