Geant4  10.01.p02
G4Polyhedra Class Reference

#include <G4Polyhedra.hh>

+ Inheritance diagram for G4Polyhedra:
+ Collaboration diagram for G4Polyhedra:

Public Member Functions

 G4Polyhedra (const G4String &name, G4double phiStart, G4double phiTotal, G4int numSide, G4int numZPlanes, const G4double zPlane[], const G4double rInner[], const G4double rOuter[])
 
 G4Polyhedra (const G4String &name, G4double phiStart, G4double phiTotal, G4int numSide, G4int numRZ, const G4double r[], const G4double z[])
 
virtual ~G4Polyhedra ()
 
EInside Inside (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
G4GeometryType GetEntityType () const
 
G4VSolidClone () const
 
G4ThreeVector GetPointOnSurface () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
G4PolyhedronCreatePolyhedron () const
 
G4bool Reset ()
 
G4int GetNumSide () const
 
G4double GetStartPhi () const
 
G4double GetEndPhi () const
 
G4bool IsOpen () const
 
G4bool IsGeneric () const
 
G4int GetNumRZCorner () const
 
G4PolyhedraSideRZ GetCorner (const G4int index) const
 
G4PolyhedraHistoricalGetOriginalParameters () const
 
void SetOriginalParameters (G4PolyhedraHistorical *pars)
 
 G4Polyhedra (__void__ &)
 
 G4Polyhedra (const G4Polyhedra &source)
 
G4Polyhedraoperator= (const G4Polyhedra &source)
 
- Public Member Functions inherited from G4VCSGfaceted
 G4VCSGfaceted (const G4String &name)
 
virtual ~G4VCSGfaceted ()
 
 G4VCSGfaceted (const G4VCSGfaceted &source)
 
G4VCSGfacetedoperator= (const G4VCSGfaceted &source)
 
virtual G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
virtual G4double DistanceToOut (const G4ThreeVector &p) const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4VisExtent GetExtent () const
 
virtual G4PolyhedronGetPolyhedron () const
 
G4int GetCubVolStatistics () const
 
G4double GetCubVolEpsilon () const
 
void SetCubVolStatistics (G4int st)
 
void SetCubVolEpsilon (G4double ep)
 
G4int GetAreaStatistics () const
 
G4double GetAreaAccuracy () const
 
void SetAreaStatistics (G4int st)
 
void SetAreaAccuracy (G4double ep)
 
virtual G4double GetCubicVolume ()
 
virtual G4double GetSurfaceArea ()
 
 G4VCSGfaceted (__void__ &)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
void DumpInfo () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Protected Member Functions

void SetOriginalParameters (G4ReduciblePolygon *rz)
 
void Create (G4double phiStart, G4double phiTotal, G4int numSide, G4ReduciblePolygon *rz)
 
void CopyStuff (const G4Polyhedra &source)
 
void DeleteStuff ()
 
G4ThreeVector GetPointOnPlane (G4ThreeVector p0, G4ThreeVector p1, G4ThreeVector p2, G4ThreeVector p3) const
 
G4ThreeVector GetPointOnTriangle (G4ThreeVector p0, G4ThreeVector p1, G4ThreeVector p2) const
 
G4ThreeVector GetPointOnSurfaceCorners () const
 
- Protected Member Functions inherited from G4VCSGfaceted
virtual G4double DistanceTo (const G4ThreeVector &p, const G4bool outgoing) const
 
G4ThreeVector GetPointOnSurfaceGeneric () const
 
void CopyStuff (const G4VCSGfaceted &source)
 
void DeleteStuff ()
 
- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Protected Attributes

G4int numSide
 
G4double startPhi
 
G4double endPhi
 
G4bool phiIsOpen
 
G4bool genericPgon
 
G4int numCorner
 
G4PolyhedraSideRZcorners
 
G4PolyhedraHistoricaloriginal_parameters
 
G4EnclosingCylinderenclosingCylinder
 
- Protected Attributes inherited from G4VCSGfaceted
G4int numFace
 
G4VCSGface ** faces
 
G4double fCubicVolume
 
G4double fSurfaceArea
 
G4bool fRebuildPolyhedron
 
G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 81 of file G4Polyhedra.hh.

Constructor & Destructor Documentation

G4Polyhedra::G4Polyhedra ( const G4String name,
G4double  phiStart,
G4double  phiTotal,
G4int  numSide,
G4int  numZPlanes,
const G4double  zPlane[],
const G4double  rInner[],
const G4double  rOuter[] 
)

Definition at line 79 of file G4Polyhedra.cc.

References Create(), DBL_EPSILON, G4VSolid::DumpInfo(), FatalErrorInArgument, G4endl, G4Exception(), G4VSolid::GetName(), G4PolyhedraHistorical::Num_z_planes, G4PolyhedraHistorical::numSide, G4PolyhedraHistorical::Opening_angle, original_parameters, G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, G4ReduciblePolygon::ScaleA(), G4PolyhedraHistorical::Start_angle, and G4PolyhedraHistorical::Z_values.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4Polyhedra::G4Polyhedra ( const G4String name,
G4double  phiStart,
G4double  phiTotal,
G4int  numSide,
G4int  numRZ,
const G4double  r[],
const G4double  z[] 
)

Definition at line 165 of file G4Polyhedra.cc.

References Create(), FatalErrorInArgument, G4endl, G4Exception(), G4VSolid::GetName(), and SetOriginalParameters().

+ Here is the call graph for this function:

G4Polyhedra::~G4Polyhedra ( )
virtual

Definition at line 387 of file G4Polyhedra.cc.

References corners, enclosingCylinder, and original_parameters.

G4Polyhedra::G4Polyhedra ( __void__ &  a)

Definition at line 376 of file G4Polyhedra.cc.

G4Polyhedra::G4Polyhedra ( const G4Polyhedra source)

Definition at line 399 of file G4Polyhedra.cc.

References CopyStuff().

+ Here is the call graph for this function:

Member Function Documentation

G4VSolid * G4Polyhedra::Clone ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 588 of file G4Polyhedra.cc.

References G4Polyhedra().

+ Here is the call graph for this function:

void G4Polyhedra::ComputeDimensions ( G4VPVParameterisation p,
const G4int  n,
const G4VPhysicalVolume pRep 
)
virtual

Reimplemented from G4VSolid.

Definition at line 568 of file G4Polyhedra.cc.

References G4VPVParameterisation::ComputeDimensions().

+ Here is the call graph for this function:

void G4Polyhedra::CopyStuff ( const G4Polyhedra source)
protected

Definition at line 429 of file G4Polyhedra.cc.

References corners, enclosingCylinder, endPhi, G4VCSGfaceted::fpPolyhedron, G4VCSGfaceted::fRebuildPolyhedron, genericPgon, numCorner, numSide, original_parameters, phiIsOpen, and startPhi.

Referenced by G4Polyhedra(), and operator=().

+ Here is the caller graph for this function:

void G4Polyhedra::Create ( G4double  phiStart,
G4double  phiTotal,
G4int  numSide,
G4ReduciblePolygon rz 
)
protected
G4Polyhedron * G4Polyhedra::CreatePolyhedron ( ) const
virtual

Creates user defined polyhedron. This function allows to the user to define arbitrary polyhedron. The faces of the polyhedron should be either triangles or planar quadrilateral. Nodes of a face are defined by indexes pointing to the elements in the xyz array. Numeration of the elements in the array starts from 1 (like in fortran). The indexes can be positive or negative. Negative sign means that the corresponding edge is invisible. The normal of the face should be directed to exterior of the polyhedron.

Parameters
Nnodesnumber of nodes
Nfacesnumber of faces
xyznodes
faces_vecfaces (quadrilaterals or triangles)
Returns
status of the operation - is non-zero in case of problem

Implements G4VCSGfaceted.

Definition at line 917 of file G4Polyhedra.cc.

References a, A, ab, corners, endPhi, G4Exception(), genericPgon, G4VSolid::GetName(), JustWarning, G4VSolid::kCarTolerance, G4PolyhedraHistorical::Num_z_planes, numCorner, G4PolyhedraHistorical::numSide, numSide, G4PolyhedraHistorical::Opening_angle, original_parameters, phiIsOpen, G4PolyhedraSideRZ::r, G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, G4PolyhedraHistorical::Start_angle, startPhi, G4PolyhedraSideRZ::z, and G4PolyhedraHistorical::Z_values.

+ Here is the call graph for this function:

void G4Polyhedra::DeleteStuff ( )
protected
G4double G4Polyhedra::DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Reimplemented from G4VCSGfaceted.

Definition at line 540 of file G4Polyhedra.cc.

References G4VCSGfaceted::DistanceToIn(), enclosingCylinder, kInfinity, and G4EnclosingCylinder::ShouldMiss().

+ Here is the call graph for this function:

G4double G4Polyhedra::DistanceToIn ( const G4ThreeVector p) const
virtual

Reimplemented from G4VCSGfaceted.

Definition at line 559 of file G4Polyhedra.cc.

References G4VCSGfaceted::DistanceToIn().

+ Here is the call graph for this function:

G4PolyhedraSideRZ G4Polyhedra::GetCorner ( const G4int  index) const
inline

Referenced by G4tgbGeometryDumper::GetSolidParams(), and G4GDMLWriteSolids::PolyhedraWrite().

+ Here is the caller graph for this function:

G4double G4Polyhedra::GetEndPhi ( ) const
inline
G4GeometryType G4Polyhedra::GetEntityType ( ) const
virtual

Reimplemented from G4VCSGfaceted.

Definition at line 579 of file G4Polyhedra.cc.

G4int G4Polyhedra::GetNumRZCorner ( ) const
inline

Referenced by export_G4Polyhedra(), G4tgbGeometryDumper::GetSolidParams(), and G4GDMLWriteSolids::PolyhedraWrite().

+ Here is the caller graph for this function:

G4int G4Polyhedra::GetNumSide ( ) const
inline

Referenced by G4tgbVolume::BuildSolidForDivision(), export_G4Polyhedra(), G4ParameterisationPolyhedraPhi::G4ParameterisationPolyhedraPhi(), and G4tgbGeometryDumper::GetSolidParams().

+ Here is the caller graph for this function:

G4ThreeVector G4Polyhedra::GetPointOnPlane ( G4ThreeVector  p0,
G4ThreeVector  p1,
G4ThreeVector  p2,
G4ThreeVector  p3 
) const
protected

Definition at line 651 of file G4Polyhedra.cc.

References CLHEP::normal(), p0, p1, p2, and G4INCL::DeJongSpin::shoot().

Referenced by GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ThreeVector G4Polyhedra::GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

Definition at line 700 of file G4Polyhedra.cc.

References a, endPhi, genericPgon, GetPointOnPlane(), G4VCSGfaceted::GetPointOnSurfaceGeneric(), G4PolyhedraHistorical::Num_z_planes, numSide, original_parameters, p0, p1, p2, phiIsOpen, G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, G4INCL::DeJongSpin::shoot(), sqr(), startPhi, and G4PolyhedraHistorical::Z_values.

+ Here is the call graph for this function:

G4ThreeVector G4Polyhedra::GetPointOnSurfaceCorners ( ) const
protected
G4ThreeVector G4Polyhedra::GetPointOnTriangle ( G4ThreeVector  p0,
G4ThreeVector  p1,
G4ThreeVector  p2 
) const
protected

Definition at line 683 of file G4Polyhedra.cc.

References p1, p2, and G4INCL::DeJongSpin::shoot().

+ Here is the call graph for this function:

G4double G4Polyhedra::GetStartPhi ( ) const
inline
EInside G4Polyhedra::Inside ( const G4ThreeVector p) const
virtual

Reimplemented from G4VCSGfaceted.

Definition at line 520 of file G4Polyhedra.cc.

References enclosingCylinder, G4VCSGfaceted::Inside(), kOutside, and G4EnclosingCylinder::MustBeOutside().

+ Here is the call graph for this function:

G4bool G4Polyhedra::IsGeneric ( ) const
inline

Referenced by export_G4Polyhedra(), G4VParameterisationPolyhedra::G4VParameterisationPolyhedra(), and G4GDMLWriteSolids::PolyhedraWrite().

+ Here is the caller graph for this function:

G4bool G4Polyhedra::IsOpen ( ) const
inline

Referenced by export_G4Polyhedra().

+ Here is the caller graph for this function:

G4Polyhedra & G4Polyhedra::operator= ( const G4Polyhedra source)

Definition at line 409 of file G4Polyhedra.cc.

References CopyStuff(), corners, enclosingCylinder, G4VCSGfaceted::operator=(), and original_parameters.

+ Here is the call graph for this function:

G4bool G4Polyhedra::Reset ( )

Definition at line 478 of file G4Polyhedra.cc.

References corners, Create(), G4VCSGfaceted::DeleteStuff(), enclosingCylinder, G4endl, G4Exception(), genericPgon, G4VSolid::GetName(), JustWarning, G4PolyhedraHistorical::Num_z_planes, G4PolyhedraHistorical::numSide, G4PolyhedraHistorical::Opening_angle, original_parameters, G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, G4PolyhedraHistorical::Start_angle, and G4PolyhedraHistorical::Z_values.

Referenced by G4GDMLParameterisation::ComputeDimensions(), G4ParameterisationPolyhedraRho::ComputeDimensions(), G4ParameterisationPolyhedraPhi::ComputeDimensions(), and G4ParameterisationPolyhedraZ::ComputeDimensions().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4Polyhedra::SetOriginalParameters ( G4PolyhedraHistorical pars)
inline

Referenced by G4GDMLParameterisation::ComputeDimensions(), G4ParameterisationPolyhedraRho::ComputeDimensions(), G4ParameterisationPolyhedraPhi::ComputeDimensions(), G4ParameterisationPolyhedraZ::ComputeDimensions(), and G4Polyhedra().

+ Here is the caller graph for this function:

std::ostream & G4Polyhedra::StreamInfo ( std::ostream &  os) const
virtual

Reimplemented from G4VCSGfaceted.

Definition at line 597 of file G4Polyhedra.cc.

References corners, degree, endPhi, genericPgon, G4VSolid::GetName(), G4PolyhedraHistorical::Num_z_planes, numCorner, numSide, original_parameters, G4PolyhedraSideRZ::r, G4PolyhedraHistorical::Rmax, G4PolyhedraHistorical::Rmin, startPhi, G4PolyhedraSideRZ::z, and G4PolyhedraHistorical::Z_values.

+ Here is the call graph for this function:

Member Data Documentation

G4PolyhedraSideRZ* G4Polyhedra::corners
protected
G4EnclosingCylinder* G4Polyhedra::enclosingCylinder
protected

Definition at line 189 of file G4Polyhedra.hh.

Referenced by CopyStuff(), Create(), DistanceToIn(), Inside(), operator=(), Reset(), and ~G4Polyhedra().

G4double G4Polyhedra::endPhi
protected
G4bool G4Polyhedra::genericPgon
protected

Definition at line 184 of file G4Polyhedra.hh.

Referenced by CopyStuff(), CreatePolyhedron(), GetPointOnSurface(), Reset(), and StreamInfo().

G4int G4Polyhedra::numCorner
protected
G4int G4Polyhedra::numSide
protected
G4PolyhedraHistorical* G4Polyhedra::original_parameters
protected
G4bool G4Polyhedra::phiIsOpen
protected

Definition at line 183 of file G4Polyhedra.hh.

Referenced by CopyStuff(), Create(), CreatePolyhedron(), and GetPointOnSurface().

G4double G4Polyhedra::startPhi
protected

The documentation for this class was generated from the following files: