45 G4VSolid(name), fShape(s), fPolyhedron(0)
50 :
G4VSolid(a), fShape(0), fPolyhedron(0)
61 return (
this == &s) ?
true :
false;
138 if(valid){ *validNorm =
true;}
139 else {* validNorm =
false;}
252 G4bool existsAfterClip = false ;
265 if (pVoxelLimit.
IsLimited(pAxis) ==
false)
269 existsAfterClip = true ;
286 existsAfterClip = true ;
321 existsAfterClip = true ;
327 return existsAfterClip;
335 std::ostringstream message;
336 message <<
"Illegal call to G4USolid::ComputeDimensions()" <<
G4endl
337 <<
"Method not overloaded by derived class !";
338 G4Exception(
"G4USolid::ComputeDimensions()",
"GeomSolids0003",
351 return "G4" + string;
356 os <<
"-----------------------------------------------------------\n"
357 <<
" *** Dump for solid - " <<
fShape->
GetName() <<
" ***\n";
395 std::ostringstream message;
396 message <<
"Clone() method not implemented for type: "
398 <<
"Returning NULL pointer!";
406 G4double xMin, xMax, yMin, yMax, zMin, zMax;
417 vertices->reserve(8);
438 G4Exception(
"G4VUSolid::CreateRotatedVertices()",
"FatalError",
457 return new G4PolyhedronTubs(array[0], array[1], array[2], array[3], array[4]);
463 return new G4PolyhedronCons(array[0], array[1], array[2], array[3], array[4], array[5], array[6]);
475 return new G4PolyhedronSphere(array[0], array[1], array[2], array[3], array[4], array[5]);
483 static int faces[4][4] = {{1, 3, 2, 0}, {1, 4, 3, 0}, {1, 2, 4, 0}, {2, 3, 4, 0}};
484 xyz[0][0] = array[0];
485 xyz[0][1] = array[1];
486 xyz[0][2] = array[2];
487 xyz[1][0] = array[3];
488 xyz[1][1] = array[4];
489 xyz[1][2] = array[5];
490 xyz[2][0] = array[6];
491 xyz[2][1] = array[7];
492 xyz[2][2] = array[8];
493 xyz[3][0] = array[9];
494 xyz[3][1] = array[10];
495 xyz[3][2] = array[11];
497 ph->createPolyhedron(4, 4, xyz, faces);
504 return new G4PolyhedronTrd2(array[0], array[1], array[2], array[3], array[4]);
510 double phi = (array[11] != 1.0) ? (std::atan(array[10] / array[9])) : (0.0);
511 double alpha1 = std::atan(array[4]);
512 double alpha2 = std::atan(array[8]);
513 double theta = std::acos(array[11]);
516 array[1], array[2], array[3], alpha1,
517 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
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)
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