ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4BoundingEnvelope Class Reference

#include <geant4/tree/geant4-10.6-release/source/geometry/management/include/G4BoundingEnvelope.hh>

+ Collaboration diagram for G4BoundingEnvelope:

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 = nullptr
 

Detailed Description

Definition at line 58 of file G4BoundingEnvelope.hh.

View newest version in sPHENIX GitHub at line 58 of file G4BoundingEnvelope.hh

Constructor & Destructor Documentation

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

Definition at line 44 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 44 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 58 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 58 of file G4BoundingEnvelope.cc

References CheckBoundingBox(), CheckBoundingPolygons(), fMax, fMin, fPolygons, kInfinity, CLHEP::Hep3Vector::set(), x, xmax, xmin, y, ymax, ymin, and z.

+ 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 97 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 97 of file G4BoundingEnvelope.cc

References CheckBoundingBox(), and CheckBoundingPolygons().

+ Here is the call graph for this function:

G4BoundingEnvelope::~G4BoundingEnvelope ( )

Definition at line 112 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 112 of file G4BoundingEnvelope.cc

Member Function Documentation

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

Definition at line 189 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 189 of file G4BoundingEnvelope.cc

References Acts::Test::delta, HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), FindScaleFactor(), fMax, fMin, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), kCarTolerance, kInfinity, kXAxis, kYAxis, kZAxis, radius, scale, CLHEP::Hep3Vector::x(), HepGeom::BasicVector3D< T >::x(), xmax, xmin, HepGeom::Transform3D::xx(), CLHEP::Hep3Vector::y(), HepGeom::BasicVector3D< T >::y(), ymax, ymin, HepGeom::Transform3D::yy(), CLHEP::Hep3Vector::z(), HepGeom::BasicVector3D< T >::z(), and HepGeom::Transform3D::zz().

Referenced by G4EllipticalTube::CalculateExtent(), G4Orb::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Tet::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Trd::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4Tubs::CalculateExtent(), G4Para::CalculateExtent(), G4Torus::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4Cons::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), and G4Trap::CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 274 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 274 of file G4BoundingEnvelope.cc

References G4VoxelLimits::AddLimit(), cd, ClipEdgesByVoxel(), ClipVoxelByPlanes(), CreateListOfEdges(), CreateListOfPlanes(), Acts::Test::delta, HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), emax, CEMC_TOWER::emin, FindScaleFactor(), fMax, fMin, fPolygons, G4VoxelLimits::GetMaxExtent(), G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), GetPrismAABB(), G4VoxelLimits::IsLimited(), k, kCarTolerance, kInfinity, kXAxis, kYAxis, kZAxis, radius, scale, TransformVertices(), CLHEP::Hep3Vector::x(), HepGeom::BasicVector3D< T >::x(), xmax, xmin, HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), CLHEP::Hep3Vector::y(), HepGeom::BasicVector3D< T >::y(), ymax, ymin, HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), CLHEP::Hep3Vector::z(), HepGeom::BasicVector3D< T >::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().

Referenced by G4ScaledSolid::CalculateExtent(), G4Box::CalculateExtent(), G4VTwistedFaceted::CalculateExtent(), G4EllipticalTube::CalculateExtent(), G4Orb::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Hype::CalculateExtent(), G4Ellipsoid::CalculateExtent(), G4Paraboloid::CalculateExtent(), G4Tet::CalculateExtent(), G4TwistedTubs::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Trd::CalculateExtent(), G4MultiUnion::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4Tubs::CalculateExtent(), G4Para::CalculateExtent(), G4Torus::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4Cons::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 120 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 120 of file G4BoundingEnvelope.cc

References fMax, fMin, G4Exception(), JustWarning, message(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

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 138 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 138 of file G4BoundingEnvelope.cc

References FatalException, fPolygons, G4Exception(), k, max, and message().

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 839 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 839 of file G4BoundingEnvelope.cc

References kdfinder::abs(), d1, d2, emax, CEMC_TOWER::emin, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), k, kCarTolerance, max, min, HepGeom::BasicVector3D< T >::setX(), HepGeom::BasicVector3D< T >::setY(), HepGeom::BasicVector3D< T >::setZ(), HepGeom::BasicVector3D< T >::x(), HepGeom::BasicVector3D< T >::y(), and HepGeom::BasicVector3D< T >::z().

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 957 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 957 of file G4BoundingEnvelope.cc

References d1, d2, emax, CEMC_TOWER::emin, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), max, min, HepGeom::BasicVector3D< T >::setX(), HepGeom::BasicVector3D< T >::setY(), HepGeom::BasicVector3D< T >::setZ(), HepGeom::BasicVector3D< T >::x(), xmax, xmin, HepGeom::BasicVector3D< T >::y(), ymax, ymin, and HepGeom::BasicVector3D< T >::z().

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 693 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 693 of file G4BoundingEnvelope.cc

References k.

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 741 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 741 of file G4BoundingEnvelope.cc

References a, b, c, Acts::VectorHelpers::cross(), d, k, kCarTolerance, HepGeom::BasicVector3D< T >::mag2(), and norm.

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 567 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 567 of file G4BoundingEnvelope.cc

References max, xx, HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), zz, and HepGeom::Transform3D::zz().

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 645 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 645 of file G4BoundingEnvelope.cc

References kInfinity, x, xmax, xmin, y, ymax, ymin, and z.

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 594 of file G4BoundingEnvelope.cc.

View newest version in sPHENIX GitHub at line 594 of file G4BoundingEnvelope.cc

References fMax, fMin, fPolygons, HepGeom::Transform3D::getTranslation(), offset, CLHEP::Hep3Vector::x(), HepGeom::Transform3D::xx(), CLHEP::Hep3Vector::y(), HepGeom::Transform3D::yy(), CLHEP::Hep3Vector::z(), and HepGeom::Transform3D::zz().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

G4ThreeVector G4BoundingEnvelope::fMax
private

Definition at line 139 of file G4BoundingEnvelope.hh.

View newest version in sPHENIX GitHub at line 139 of file G4BoundingEnvelope.hh

Referenced by BoundingBoxVsVoxelLimits(), CalculateExtent(), CheckBoundingBox(), G4BoundingEnvelope(), and TransformVertices().

G4ThreeVector G4BoundingEnvelope::fMin
private

Definition at line 139 of file G4BoundingEnvelope.hh.

View newest version in sPHENIX GitHub at line 139 of file G4BoundingEnvelope.hh

Referenced by BoundingBoxVsVoxelLimits(), CalculateExtent(), CheckBoundingBox(), G4BoundingEnvelope(), and TransformVertices().

const std::vector<const G4ThreeVectorList*>* G4BoundingEnvelope::fPolygons = nullptr
private

Definition at line 142 of file G4BoundingEnvelope.hh.

View newest version in sPHENIX GitHub at line 142 of file G4BoundingEnvelope.hh

Referenced by CalculateExtent(), CheckBoundingPolygons(), G4BoundingEnvelope(), and TransformVertices().


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