|
Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
|
G4ClippablePolygon in a utility class defining a polygon that can be clipped by a voxel. More...
#include <G4ClippablePolygon.hh>
Public Member Functions | |
| G4ClippablePolygon () | |
| ~G4ClippablePolygon ()=default | |
| void | AddVertexInOrder (const G4ThreeVector &vertex) |
| void | ClearAllVertices () |
| const G4ThreeVector | GetNormal () const |
| void | SetNormal (const G4ThreeVector &newNormal) |
| G4bool | Clip (const G4VoxelLimits &voxelLimit) |
| G4bool | PartialClip (const G4VoxelLimits &voxelLimit, const EAxis IgnoreMe) |
| void | ClipAlongOneAxis (const G4VoxelLimits &voxelLimit, const EAxis axis) |
| G4bool | GetExtent (const EAxis axis, G4double &min, G4double &max) const |
| const G4ThreeVector * | GetMinPoint (const EAxis axis) const |
| const G4ThreeVector * | GetMaxPoint (const EAxis axis) const |
| std::size_t | GetNumVertices () const |
| G4bool | Empty () const |
| G4bool | InFrontOf (const G4ClippablePolygon &other, EAxis axis) const |
| G4bool | BehindOf (const G4ClippablePolygon &other, EAxis axis) const |
| G4bool | GetPlanerExtent (const G4ThreeVector &pointOnPlane, const G4ThreeVector &planeNormal, G4double &min, G4double &max) const |
G4ClippablePolygon in a utility class defining a polygon that can be clipped by a voxel.
Definition at line 51 of file G4ClippablePolygon.hh.
| G4ClippablePolygon::G4ClippablePolygon | ( | ) |
Default Constructor and Destructor.
Definition at line 38 of file G4ClippablePolygon.cc.
Referenced by BehindOf(), Empty(), and InFrontOf().
|
default |
| void G4ClippablePolygon::AddVertexInOrder | ( | const G4ThreeVector & | vertex | ) |
Adds a vertex to collection.
Definition at line 46 of file G4ClippablePolygon.cc.
Referenced by G4PolyconeSide::CalculateExtent(), G4PolyhedraSide::CalculateExtent(), and G4PolyPhiFace::CalculateExtent().
| G4bool G4ClippablePolygon::BehindOf | ( | const G4ClippablePolygon & | other, |
| EAxis | axis ) const |
Decides if this polygon is behind another. Remarks in previous method are valid here too.
Definition at line 268 of file G4ClippablePolygon.cc.
Referenced by G4SolidExtentList::AddSurface().
| void G4ClippablePolygon::ClearAllVertices | ( | ) |
Clears the collection of vertices.
Definition at line 53 of file G4ClippablePolygon.cc.
Referenced by G4PolyconeSide::CalculateExtent().
| G4bool G4ClippablePolygon::Clip | ( | const G4VoxelLimits & | voxelLimit | ) |
Clips the polygon along the Cartesian axes, as specified in 'voxelLimit'.
Definition at line 60 of file G4ClippablePolygon.cc.
| void G4ClippablePolygon::ClipAlongOneAxis | ( | const G4VoxelLimits & | voxelLimit, |
| const EAxis | axis ) |
Clips the polygon along just one axis, as specified in 'voxelLimit'.
Definition at line 374 of file G4ClippablePolygon.cc.
Referenced by Clip(), and PartialClip().
|
inline |
Returns true if collection of vertices is empty.
Referenced by BehindOf(), and InFrontOf().
Computes the polygon extent along the specified 'axis'.
| [in] | axis | The Cartesian axis along which computing the extent. |
| [out] | min | The minimum extent value. |
| [out] | max | The maximum extent value. |
Definition at line 91 of file G4ClippablePolygon.cc.
Referenced by G4SolidExtentList::AddSurface().
| const G4ThreeVector * G4ClippablePolygon::GetMaxPoint | ( | const EAxis | axis | ) | const |
Definition at line 164 of file G4ClippablePolygon.cc.
Referenced by BehindOf().
| const G4ThreeVector * G4ClippablePolygon::GetMinPoint | ( | const EAxis | axis | ) | const |
Returns a pointer to the minimum or maximum point along specified 'axis'. Take care! Do not use pointer after destroying parent polygon.
Definition at line 134 of file G4ClippablePolygon.cc.
Referenced by InFrontOf().
|
inline |
Accessor and setter for normal vector.
Referenced by BehindOf(), and InFrontOf().
|
inline |
Returns the number of vertices in the polygon.
| G4bool G4ClippablePolygon::GetPlanerExtent | ( | const G4ThreeVector & | pointOnPlane, |
| const G4ThreeVector & | planeNormal, | ||
| G4double & | min, | ||
| G4double & | max ) const |
Gets min/max vertices distance in or out of a plane.
| [in] | pointOnPlane | The point on the plane. |
| [in] | planeNormal | The normal vector to the plane. |
| [out] | min | The minimum distance from the plane. |
| [out] | max | The maximum distance from the plane. |
Definition at line 331 of file G4ClippablePolygon.cc.
Referenced by BehindOf(), and InFrontOf().
| G4bool G4ClippablePolygon::InFrontOf | ( | const G4ClippablePolygon & | other, |
| EAxis | axis ) const |
Decides if the polygon is in "front" of another when viewed along the specified 'axis'. For our purposes here, it is sufficient to use the minimum extent of the polygon along the axis to determine this.
Definition at line 204 of file G4ClippablePolygon.cc.
Referenced by G4SolidExtentList::AddSurface().
| G4bool G4ClippablePolygon::PartialClip | ( | const G4VoxelLimits & | voxelLimit, |
| const EAxis | IgnoreMe ) |
Clips the polygon while ignoring the indicated axis.
Definition at line 76 of file G4ClippablePolygon.cc.
Referenced by G4PolyconeSide::CalculateExtent(), G4PolyhedraSide::CalculateExtent(), and G4PolyPhiFace::CalculateExtent().
|
inline |