|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendicular to the Cartesian axes. More...
#include <G4VoxelLimits.hh>
Public Member Functions | |
| G4VoxelLimits ()=default | |
| ~G4VoxelLimits ()=default | |
| void | AddLimit (const EAxis pAxis, const G4double pMin, const G4double pMax) |
| G4double | GetMaxXExtent () const |
| G4double | GetMaxYExtent () const |
| G4double | GetMaxZExtent () const |
| G4double | GetMinXExtent () const |
| G4double | GetMinYExtent () const |
| G4double | GetMinZExtent () const |
| G4double | GetMaxExtent (const EAxis pAxis) const |
| G4double | GetMinExtent (const EAxis pAxis) const |
| G4bool | IsXLimited () const |
| G4bool | IsYLimited () const |
| G4bool | IsZLimited () const |
| G4bool | IsLimited () const |
| G4bool | IsLimited (const EAxis pAxis) const |
| G4bool | ClipToLimits (G4ThreeVector &pStart, G4ThreeVector &pEnd) const |
| G4bool | Inside (const G4ThreeVector &pVec) const |
| G4int | OutCode (const G4ThreeVector &pVec) const |
G4VoxelLimits represents limitation/restrictions of space, where restrictions are only made perpendicular to the Cartesian axes.
Definition at line 57 of file G4VoxelLimits.hh.
|
default |
Default Constructor & Destructor. Constructor initialises to be unlimited. Volume unrestricted.
|
default |
Restricts the volume to between specified min and max along the given axis. Cartesian axes only, pMin<=pMax.
Definition at line 40 of file G4VoxelLimits.cc.
Referenced by G4BoundingEnvelope::CalculateExtent(), G4ReflectedSolid::CalculateExtent(), G4ClippablePolygon::ClipAlongOneAxis(), and G4VSolid::ClipPolygon().
| G4bool G4VoxelLimits::ClipToLimits | ( | G4ThreeVector & | pStart, |
| G4ThreeVector & | pEnd ) const |
Clips the line segment pStart->pEnd to the volume described by the current limits. Returns true if the line remains after clipping, else false, and leaves the vectors in an undefined state.
Definition at line 76 of file G4VoxelLimits.cc.
Accessors for the extent of the volume along the specified axis.
Referenced by G4BoundingEnvelope::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), G4Torus::CalculateExtent(), G4ClippablePolygon::ClipAlongOneAxis(), and G4SolidExtentList::G4SolidExtentList().
| G4double G4VoxelLimits::GetMaxXExtent | ( | ) | const |
Accessors for max extent
Referenced by G4BoundingEnvelope::BoundingBoxVsVoxelLimits(), G4BoundingEnvelope::CalculateExtent(), G4ReflectedSolid::CalculateExtent(), G4VSolid::ClipPolygon(), and operator<<().
| G4double G4VoxelLimits::GetMaxYExtent | ( | ) | const |
| G4double G4VoxelLimits::GetMaxZExtent | ( | ) | const |
Referenced by G4BoundingEnvelope::CalculateExtent(), G4ExtrudedSolid::CalculateExtent(), G4GenericPolycone::CalculateExtent(), G4Polycone::CalculateExtent(), G4Polyhedra::CalculateExtent(), G4TessellatedSolid::CalculateExtent(), G4Torus::CalculateExtent(), G4ClippablePolygon::ClipAlongOneAxis(), and G4SolidExtentList::G4SolidExtentList().
| G4double G4VoxelLimits::GetMinXExtent | ( | ) | const |
Accessors for min extent
Referenced by G4BoundingEnvelope::BoundingBoxVsVoxelLimits(), G4BoundingEnvelope::CalculateExtent(), G4ReflectedSolid::CalculateExtent(), G4VSolid::ClipPolygon(), and operator<<().
| G4double G4VoxelLimits::GetMinYExtent | ( | ) | const |
| G4double G4VoxelLimits::GetMinZExtent | ( | ) | const |
| G4bool G4VoxelLimits::Inside | ( | const G4ThreeVector & | pVec | ) | const |
Returns true if the specified vector is inside/on boundaries of limits.
| G4bool G4VoxelLimits::IsLimited | ( | ) | const |
Return true if limited along any axis.
Referenced by G4BoundingEnvelope::CalculateExtent(), G4ClippablePolygon::Clip(), G4ClippablePolygon::ClipAlongOneAxis(), G4VSolid::ClipPolygon(), G4SolidExtentList::G4SolidExtentList(), and G4ClippablePolygon::PartialClip().
Return true if the specified axis is restricted/limited.
| G4bool G4VoxelLimits::IsXLimited | ( | ) | const |
Return true if the X/Y/Z axis is limited.
Referenced by G4VSolid::ClipPolygon(), operator<<(), and OutCode().
| G4bool G4VoxelLimits::IsYLimited | ( | ) | const |
Referenced by G4VSolid::ClipPolygon(), operator<<(), and OutCode().
| G4bool G4VoxelLimits::IsZLimited | ( | ) | const |
Referenced by G4VSolid::ClipPolygon(), operator<<(), and OutCode().
| G4int G4VoxelLimits::OutCode | ( | const G4ThreeVector & | pVec | ) | const |
Calculates the 'outcode' for the specified vector. Intended for use during clipping against the limits. The bits are set given the following conditions: 0 pVec.x()<fxAxisMin && IsXLimited() 1 pVec.x()>fxAxisMax && IsXLimited() 2 pVec.y()<fyAxisMin && IsYLimited() 3 pVec.y()>fyAxisMax && IsYLimited() 4 pVec.z()<fzAxisMin && IsZLimited() 5 pVec.z()>fzAxisMax && IsZLimited()
Definition at line 220 of file G4VoxelLimits.cc.
Referenced by ClipToLimits().