Geant4-11
|
#include <G4BoundingEnvelope.hh>
Public Member Functions | |
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 |
G4BoundingEnvelope (const G4ThreeVector &pMin, const G4ThreeVector &pMax) | |
G4BoundingEnvelope (const G4ThreeVector &pMin, const G4ThreeVector &pMax, const std::vector< const G4ThreeVectorList * > &polygons) | |
G4BoundingEnvelope (const std::vector< const G4ThreeVectorList * > &polygons) | |
~G4BoundingEnvelope ()=default | |
Private Member Functions | |
void | CheckBoundingBox () |
void | CheckBoundingPolygons () |
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 |
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 |
G4double | FindScaleFactor (const G4Transform3D &pTransform3D) const |
void | GetPrismAABB (const G4Polygon3D &pBaseA, const G4Polygon3D &pBaseB, G4Segment3D &pAABB) const |
void | TransformVertices (const G4Transform3D &pTransform3D, std::vector< G4Polygon3D * > &pBases) const |
Private Attributes | |
G4ThreeVector | fMax |
G4ThreeVector | fMin |
const std::vector< const G4ThreeVectorList * > * | fPolygons = nullptr |
Definition at line 58 of file G4BoundingEnvelope.hh.
G4BoundingEnvelope::G4BoundingEnvelope | ( | const G4ThreeVector & | pMin, |
const G4ThreeVector & | pMax | ||
) |
Definition at line 44 of file G4BoundingEnvelope.cc.
References CheckBoundingBox().
G4BoundingEnvelope::G4BoundingEnvelope | ( | const std::vector< const G4ThreeVectorList * > & | polygons | ) |
Definition at line 57 of file G4BoundingEnvelope.cc.
References CheckBoundingBox(), CheckBoundingPolygons(), fMax, fMin, fPolygons, kInfinity, and CLHEP::Hep3Vector::set().
G4BoundingEnvelope::G4BoundingEnvelope | ( | const G4ThreeVector & | pMin, |
const G4ThreeVector & | pMax, | ||
const std::vector< const G4ThreeVectorList * > & | polygons | ||
) |
Definition at line 96 of file G4BoundingEnvelope.cc.
References CheckBoundingBox(), and CheckBoundingPolygons().
|
default |
G4bool G4BoundingEnvelope::BoundingBoxVsVoxelLimits | ( | const EAxis | pAxis, |
const G4VoxelLimits & | pVoxelLimits, | ||
const G4Transform3D & | pTransform3D, | ||
G4double & | pMin, | ||
G4double & | pMax | ||
) | const |
Definition at line 180 of file G4BoundingEnvelope.cc.
References 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, pMax, pMin, HepGeom::BasicVector3D< T >::x(), CLHEP::Hep3Vector::x(), HepGeom::Transform3D::xx(), HepGeom::BasicVector3D< T >::y(), CLHEP::Hep3Vector::y(), HepGeom::Transform3D::yy(), HepGeom::BasicVector3D< T >::z(), CLHEP::Hep3Vector::z(), and HepGeom::Transform3D::zz().
Referenced by G4Cons::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Orb::CalculateExtent(), G4Para::CalculateExtent(), G4Torus::CalculateExtent(), G4Trap::CalculateExtent(), G4Trd::CalculateExtent(), G4Tubs::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4EllipticalTube::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), and G4Tet::CalculateExtent().
G4bool G4BoundingEnvelope::CalculateExtent | ( | const EAxis | pAxis, |
const G4VoxelLimits & | pVoxelLimits, | ||
const G4Transform3D & | pTransform3D, | ||
G4double & | pMin, | ||
G4double & | pMax | ||
) | const |
Definition at line 266 of file G4BoundingEnvelope.cc.
References G4VoxelLimits::AddLimit(), cd, ClipEdgesByVoxel(), ClipVoxelByPlanes(), CreateListOfEdges(), CreateListOfPlanes(), HepGeom::Transform3D::dx(), HepGeom::Transform3D::dy(), HepGeom::Transform3D::dz(), 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, pMax, pMin, TransformVertices(), HepGeom::BasicVector3D< T >::x(), CLHEP::Hep3Vector::x(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::BasicVector3D< T >::y(), CLHEP::Hep3Vector::y(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::BasicVector3D< T >::z(), CLHEP::Hep3Vector::z(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().
Referenced by G4MultiUnion::CalculateExtent(), G4ScaledSolid::CalculateExtent(), G4Box::CalculateExtent(), G4Cons::CalculateExtent(), G4CutTubs::CalculateExtent(), G4Orb::CalculateExtent(), G4Para::CalculateExtent(), G4Sphere::CalculateExtent(), G4Torus::CalculateExtent(), G4Trap::CalculateExtent(), G4Trd::CalculateExtent(), G4Tubs::CalculateExtent(), G4Ellipsoid::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4EllipticalTube::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4GenericTrap::CalculateExtent(), G4Hype::CalculateExtent(), G4Paraboloid::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), G4Tet::CalculateExtent(), G4TwistedTubs::CalculateExtent(), and G4VTwistedFaceted::CalculateExtent().
|
private |
Definition at line 112 of file G4BoundingEnvelope.cc.
References fMax, fMin, G4Exception(), JustWarning, CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().
Referenced by G4BoundingEnvelope().
|
private |
Definition at line 130 of file G4BoundingEnvelope.cc.
References FatalException, fPolygons, G4Exception(), and G4INCL::Math::max().
Referenced by G4BoundingEnvelope().
|
private |
Definition at line 831 of file G4BoundingEnvelope.cc.
References d1, d2, emax, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), kCarTolerance, G4INCL::Math::max(), G4INCL::Math::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().
|
private |
Definition at line 949 of file G4BoundingEnvelope.cc.
References d1, d2, emax, G4VoxelLimits::GetMaxXExtent(), G4VoxelLimits::GetMaxYExtent(), G4VoxelLimits::GetMaxZExtent(), G4VoxelLimits::GetMinXExtent(), G4VoxelLimits::GetMinYExtent(), G4VoxelLimits::GetMinZExtent(), G4INCL::Math::max(), G4INCL::Math::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().
|
private |
Definition at line 685 of file G4BoundingEnvelope.cc.
Referenced by CalculateExtent().
|
private |
Definition at line 733 of file G4BoundingEnvelope.cc.
References kCarTolerance, and HepGeom::BasicVector3D< T >::mag2().
Referenced by CalculateExtent().
|
private |
Definition at line 559 of file G4BoundingEnvelope.cc.
References G4INCL::Math::max(), HepGeom::Transform3D::xx(), HepGeom::Transform3D::xy(), HepGeom::Transform3D::xz(), HepGeom::Transform3D::yx(), HepGeom::Transform3D::yy(), HepGeom::Transform3D::yz(), HepGeom::Transform3D::zx(), HepGeom::Transform3D::zy(), and HepGeom::Transform3D::zz().
Referenced by BoundingBoxVsVoxelLimits(), and CalculateExtent().
|
private |
Definition at line 637 of file G4BoundingEnvelope.cc.
References kInfinity.
Referenced by CalculateExtent().
|
private |
Definition at line 586 of file G4BoundingEnvelope.cc.
References fMax, fMin, fPolygons, HepGeom::Transform3D::getTranslation(), CLHEP::Hep3Vector::x(), HepGeom::Transform3D::xx(), CLHEP::Hep3Vector::y(), HepGeom::Transform3D::yy(), CLHEP::Hep3Vector::z(), and HepGeom::Transform3D::zz().
Referenced by CalculateExtent().
|
private |
Definition at line 139 of file G4BoundingEnvelope.hh.
Referenced by BoundingBoxVsVoxelLimits(), CalculateExtent(), CheckBoundingBox(), G4BoundingEnvelope(), and TransformVertices().
|
private |
Definition at line 139 of file G4BoundingEnvelope.hh.
Referenced by BoundingBoxVsVoxelLimits(), CalculateExtent(), CheckBoundingBox(), G4BoundingEnvelope(), and TransformVertices().
|
private |
Definition at line 142 of file G4BoundingEnvelope.hh.
Referenced by CalculateExtent(), CheckBoundingPolygons(), G4BoundingEnvelope(), and TransformVertices().