Import Geant4 11.2.0.beta source tree
This commit is contained in:
@@ -46,73 +46,73 @@ class G4VoxelLimits;
|
||||
|
||||
class G4ClippablePolygon
|
||||
{
|
||||
typedef std::vector<G4ThreeVector> G4ThreeVectorList;
|
||||
using G4ThreeVectorList = std::vector<G4ThreeVector>;
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ClippablePolygon();
|
||||
virtual ~G4ClippablePolygon();
|
||||
// Constructor & virtual destructor.
|
||||
G4ClippablePolygon();
|
||||
virtual ~G4ClippablePolygon();
|
||||
// Constructor & virtual destructor.
|
||||
|
||||
virtual void AddVertexInOrder( const G4ThreeVector vertex );
|
||||
virtual void ClearAllVertices();
|
||||
virtual void AddVertexInOrder( const G4ThreeVector vertex );
|
||||
virtual void ClearAllVertices();
|
||||
|
||||
inline void SetNormal( const G4ThreeVector& newNormal );
|
||||
inline const G4ThreeVector GetNormal() const;
|
||||
inline void SetNormal( const G4ThreeVector& newNormal );
|
||||
inline const G4ThreeVector GetNormal() const;
|
||||
|
||||
virtual G4bool Clip( const G4VoxelLimits& voxelLimit );
|
||||
virtual G4bool Clip( const G4VoxelLimits& voxelLimit );
|
||||
|
||||
virtual G4bool PartialClip( const G4VoxelLimits& voxelLimit,
|
||||
const EAxis IgnoreMe );
|
||||
// Clip, while ignoring the indicated axis.
|
||||
virtual G4bool PartialClip( const G4VoxelLimits& voxelLimit,
|
||||
const EAxis IgnoreMe );
|
||||
// Clip, while ignoring the indicated axis.
|
||||
|
||||
virtual void ClipAlongOneAxis( const G4VoxelLimits& voxelLimit,
|
||||
const EAxis axis );
|
||||
// Clip along just one axis, as specified in voxelLimit.
|
||||
virtual void ClipAlongOneAxis( const G4VoxelLimits& voxelLimit,
|
||||
const EAxis axis );
|
||||
// Clip along just one axis, as specified in voxelLimit.
|
||||
|
||||
virtual G4bool GetExtent( const EAxis axis,
|
||||
G4double& min, G4double& max ) const;
|
||||
virtual G4bool GetExtent( const EAxis axis,
|
||||
G4double& min, G4double& max ) const;
|
||||
|
||||
virtual const G4ThreeVector* GetMinPoint( const EAxis axis ) const;
|
||||
// Returns pointer to minimum point along the specified axis.
|
||||
// Take care! Do not use pointer after destroying parent polygon.
|
||||
virtual const G4ThreeVector* GetMinPoint( const EAxis axis ) const;
|
||||
// Returns pointer to minimum point along the specified axis.
|
||||
// Take care! Do not use pointer after destroying parent polygon.
|
||||
|
||||
virtual const G4ThreeVector* GetMaxPoint( const EAxis axis ) const;
|
||||
// Returns pointer to maximum point along the specified axis.
|
||||
// Take care! Do not use pointer after destroying parent polygon.
|
||||
virtual const G4ThreeVector* GetMaxPoint( const EAxis axis ) const;
|
||||
// Returns pointer to maximum point along the specified axis.
|
||||
// Take care! Do not use pointer after destroying parent polygon.
|
||||
|
||||
inline std::size_t GetNumVertices() const;
|
||||
inline G4bool Empty() const;
|
||||
inline std::size_t GetNumVertices() const;
|
||||
inline G4bool Empty() const;
|
||||
|
||||
virtual G4bool InFrontOf( const G4ClippablePolygon& other, EAxis axis ) const;
|
||||
// Decide 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.
|
||||
virtual G4bool InFrontOf(const G4ClippablePolygon& other, EAxis axis) const;
|
||||
// Decide 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.
|
||||
|
||||
virtual G4bool BehindOf( const G4ClippablePolygon& other, EAxis axis ) const;
|
||||
// Decide if this polygon is behind another.
|
||||
// Remarks in method "InFrontOf" are valid here too.
|
||||
virtual G4bool BehindOf(const G4ClippablePolygon& other, EAxis axis) const;
|
||||
// Decide if this polygon is behind another.
|
||||
// Remarks in method "InFrontOf" are valid here too.
|
||||
|
||||
virtual G4bool GetPlanerExtent( const G4ThreeVector& pointOnPlane,
|
||||
const G4ThreeVector& planeNormal,
|
||||
G4double& min, G4double& max ) const;
|
||||
// Get min/max distance in or out of a plane.
|
||||
virtual G4bool GetPlanerExtent( const G4ThreeVector& pointOnPlane,
|
||||
const G4ThreeVector& planeNormal,
|
||||
G4double& min, G4double& max ) const;
|
||||
// Get min/max distance in or out of a plane.
|
||||
|
||||
protected: // with description
|
||||
protected:
|
||||
|
||||
void ClipToSimpleLimits( G4ThreeVectorList& pPolygon,
|
||||
G4ThreeVectorList& outputPolygon,
|
||||
const G4VoxelLimits& pVoxelLimit );
|
||||
// pVoxelLimits must be only limited along one axis, and either
|
||||
// the maximum along the axis must be +kInfinity, or the minimum
|
||||
// -kInfinity
|
||||
void ClipToSimpleLimits( G4ThreeVectorList& pPolygon,
|
||||
G4ThreeVectorList& outputPolygon,
|
||||
const G4VoxelLimits& pVoxelLimit );
|
||||
// pVoxelLimits must be only limited along one axis, and either
|
||||
// the maximum along the axis must be +kInfinity, or the minimum
|
||||
// -kInfinity
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
G4ThreeVectorList vertices;
|
||||
G4ThreeVector normal;
|
||||
G4double kCarTolerance;
|
||||
G4ThreeVectorList vertices;
|
||||
G4ThreeVector normal;
|
||||
G4double kCarTolerance;
|
||||
};
|
||||
|
||||
#include "G4ClippablePolygon.icc"
|
||||
|
||||
Reference in New Issue
Block a user