Geant4  10.03
G4BoundingEnvelope Class Reference

#include <G4BoundingEnvelope.hh>

Public Member Functions

 G4BoundingEnvelope (const G4ThreeVector &pMin, const G4ThreeVector &pMax)
 
 G4BoundingEnvelope (const std::vector< const G4ThreeVectorList * > &polygons)
 
 G4BoundingEnvelope (const G4ThreeVector &pMin, const G4ThreeVector &pMax, const std::vector< const G4ThreeVectorList * > &polygons)
 
 ~G4BoundingEnvelope ()
 
G4bool BoundingBoxVsVoxelLimits (const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimits, const G4Transform3D &pTransform3D, G4double &pMin, G4double &pMax) const
 

Private Member Functions

void CheckBoundingBox ()
 
void CheckBoundingPolygons ()
 
G4double FindScaleFactor (const G4Transform3D &pTransform3D) const
 
void TransformVertices (const G4Transform3D &pTransform3D, std::vector< G4Polygon3D * > &pBases) const
 
void GetPrismAABB (const G4Polygon3D &pBaseA, const G4Polygon3D &pBaseB, G4Segment3D &pAABB) const
 
void CreateListOfEdges (const G4Polygon3D &baseA, const G4Polygon3D &baseB, std::vector< G4Segment3D > &pEdges) const
 
void CreateListOfPlanes (const G4Polygon3D &baseA, const G4Polygon3D &baseB, std::vector< G4Plane3D > &pPlanes) const
 
G4bool ClipEdgesByVoxel (const std::vector< G4Segment3D > &pEdges, const G4VoxelLimits &pLimits, G4Segment3D &pExtent) const
 
void ClipVoxelByPlanes (G4int pBits, const G4VoxelLimits &pLimits, const std::vector< G4Plane3D > &pPlanes, const G4Segment3D &pAABB, G4Segment3D &pExtent) const
 

Private Attributes

G4ThreeVector fMin
 
G4ThreeVector fMax
 
const std::vector< const
G4ThreeVectorList * > * 
fPolygons
 

Detailed Description

Definition at line 65 of file G4BoundingEnvelope.hh.

Constructor & Destructor Documentation

G4BoundingEnvelope::G4BoundingEnvelope ( const G4ThreeVector pMin,
const G4ThreeVector pMax 
)

Definition at line 51 of file G4BoundingEnvelope.cc.

References CheckBoundingBox().

+ Here is the call graph for this function:

G4BoundingEnvelope::G4BoundingEnvelope ( const std::vector< const G4ThreeVectorList * > &  polygons)

Definition at line 65 of file G4BoundingEnvelope.cc.

References CheckBoundingBox(), CheckBoundingPolygons(), fMax, fMin, fPolygons, and kInfinity.

+ Here is the call graph for this function:

G4BoundingEnvelope::G4BoundingEnvelope ( const G4ThreeVector pMin,
const G4ThreeVector pMax,
const std::vector< const G4ThreeVectorList * > &  polygons 
)

Definition at line 106 of file G4BoundingEnvelope.cc.

References CheckBoundingBox(), and CheckBoundingPolygons().

+ Here is the call graph for this function:

G4BoundingEnvelope::~G4BoundingEnvelope ( )

Definition at line 121 of file G4BoundingEnvelope.cc.

Member Function Documentation

G4bool G4BoundingEnvelope::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimits,
const G4Transform3D pTransform3D,
G4double pMin,
G4double pMax 
) const

Definition at line 283 of file G4BoundingEnvelope.cc.

References G4VoxelLimits::AddLimit(), cd, ClipEdgesByVoxel(), ClipVoxelByPlanes(), CreateListOfEdges(), CreateListOfPlanes(), emax, FindScaleFactor(), fMax, fMin, fPolygons, G4VoxelLimits::GetMaxExtent(), G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), GetPrismAABB(), G4VoxelLimits::IsLimited(), kCarTolerance, kInfinity, kXAxis, kYAxis, kZAxis, and TransformVertices().

Referenced by G4ScaledSolid::CalculateExtent(), G4EllipticalTube::CalculateExtent(), G4Box::CalculateExtent(), G4CutTubs::CalculateExtent(), G4VTwistedFaceted::CalculateExtent(), G4Hype::CalculateExtent(), G4Tet::CalculateExtent(), G4Orb::CalculateExtent(), G4Ellipsoid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4OTubs::CalculateExtent(), G4Paraboloid::CalculateExtent(), G4TwistedTubs::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4Trd::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4Para::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4Tubs::CalculateExtent(), G4Cons::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4Torus::CalculateExtent(), G4Sphere::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), and G4Trap::CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4BoundingEnvelope::CheckBoundingBox ( )
private

Definition at line 129 of file G4BoundingEnvelope.cc.

References fMax, fMin, G4Exception(), and JustWarning.

Referenced by G4BoundingEnvelope().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4BoundingEnvelope::CheckBoundingPolygons ( )
private

Definition at line 147 of file G4BoundingEnvelope.cc.

References FatalException, fPolygons, G4Exception(), and G4INCL::Math::max().

Referenced by G4BoundingEnvelope().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4BoundingEnvelope::ClipEdgesByVoxel ( const std::vector< G4Segment3D > &  pEdges,
const G4VoxelLimits pLimits,
G4Segment3D pExtent 
) const
private

Definition at line 851 of file G4BoundingEnvelope.cc.

References d1, d2, emax, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), kCarTolerance, G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4BoundingEnvelope::ClipVoxelByPlanes ( G4int  pBits,
const G4VoxelLimits pLimits,
const std::vector< G4Plane3D > &  pPlanes,
const G4Segment3D pAABB,
G4Segment3D pExtent 
) const
private

Definition at line 969 of file G4BoundingEnvelope.cc.

References d1, d2, emax, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4BoundingEnvelope::CreateListOfEdges ( const G4Polygon3D baseA,
const G4Polygon3D baseB,
std::vector< G4Segment3D > &  pEdges 
) const
private

Definition at line 705 of file G4BoundingEnvelope.cc.

Referenced by CalculateExtent().

+ Here is the caller graph for this function:

void G4BoundingEnvelope::CreateListOfPlanes ( const G4Polygon3D baseA,
const G4Polygon3D baseB,
std::vector< G4Plane3D > &  pPlanes 
) const
private

Definition at line 753 of file G4BoundingEnvelope.cc.

References a, and kCarTolerance.

Referenced by CalculateExtent().

+ Here is the caller graph for this function:

G4double G4BoundingEnvelope::FindScaleFactor ( const G4Transform3D pTransform3D) const
private

Definition at line 578 of file G4BoundingEnvelope.cc.

References G4INCL::Math::max().

Referenced by BoundingBoxVsVoxelLimits(), and CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4BoundingEnvelope::GetPrismAABB ( const G4Polygon3D pBaseA,
const G4Polygon3D pBaseB,
G4Segment3D pAABB 
) const
private

Definition at line 656 of file G4BoundingEnvelope.cc.

References kInfinity.

Referenced by CalculateExtent().

+ Here is the caller graph for this function:

void G4BoundingEnvelope::TransformVertices ( const G4Transform3D pTransform3D,
std::vector< G4Polygon3D * > &  pBases 
) const
private

Definition at line 605 of file G4BoundingEnvelope.cc.

References fMax, fMin, and fPolygons.

Referenced by CalculateExtent().

+ Here is the caller graph for this function:

Member Data Documentation

G4ThreeVector G4BoundingEnvelope::fMax
private
G4ThreeVector G4BoundingEnvelope::fMin
private
const std::vector<const G4ThreeVectorList*>* G4BoundingEnvelope::fPolygons
private

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