Geant4  10.00.p02
G4ClippablePolygon Class Reference

#include <G4ClippablePolygon.hh>

Public Member Functions

 G4ClippablePolygon ()
 
virtual ~G4ClippablePolygon ()
 
virtual void AddVertexInOrder (const G4ThreeVector vertex)
 
virtual void ClearAllVertices ()
 
void SetNormal (const G4ThreeVector &newNormal)
 
const G4ThreeVector GetNormal () const
 
virtual G4bool Clip (const G4VoxelLimits &voxelLimit)
 
virtual G4bool PartialClip (const G4VoxelLimits &voxelLimit, const EAxis IgnoreMe)
 
virtual void ClipAlongOneAxis (const G4VoxelLimits &voxelLimit, const EAxis axis)
 
virtual G4bool GetExtent (const EAxis axis, G4double &min, G4double &max) const
 
virtual const G4ThreeVectorGetMinPoint (const EAxis axis) const
 
virtual const G4ThreeVectorGetMaxPoint (const EAxis axis) const
 
G4int GetNumVertices () const
 
G4bool Empty () const
 
virtual G4bool InFrontOf (const G4ClippablePolygon &other, EAxis axis) const
 
virtual G4bool BehindOf (const G4ClippablePolygon &other, EAxis axis) const
 
virtual G4bool GetPlanerExtent (const G4ThreeVector &pointOnPlane, const G4ThreeVector &planeNormal, G4double &min, G4double &max) const
 

Protected Member Functions

void ClipToSimpleLimits (G4ThreeVectorList &pPolygon, G4ThreeVectorList &outputPolygon, const G4VoxelLimits &pVoxelLimit)
 

Protected Attributes

G4ThreeVectorList vertices
 
G4ThreeVector normal
 
G4double kCarTolerance
 

Private Types

typedef std::vector
< G4ThreeVector
G4ThreeVectorList
 

Detailed Description

Definition at line 55 of file G4ClippablePolygon.hh.

Member Typedef Documentation

Definition at line 57 of file G4ClippablePolygon.hh.

Constructor & Destructor Documentation

G4ClippablePolygon::G4ClippablePolygon ( )

Definition at line 48 of file G4ClippablePolygon.cc.

References G4GeometryTolerance::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), and kCarTolerance.

+ Here is the call graph for this function:

G4ClippablePolygon::~G4ClippablePolygon ( )
virtual

Definition at line 58 of file G4ClippablePolygon.cc.

Member Function Documentation

void G4ClippablePolygon::AddVertexInOrder ( const G4ThreeVector  vertex)
virtual

Definition at line 66 of file G4ClippablePolygon.cc.

References vertices.

Referenced by G4Hype::AddPolyToExtent(), G4TwistedTubs::AddPolyToExtent(), G4EllipticalTube::CalculateExtent(), G4Hype::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4PolyPhiFace::CalculateExtent(), G4PolyconeSide::CalculateExtent(), and G4PolyhedraSide::CalculateExtent().

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::BehindOf ( const G4ClippablePolygon other,
EAxis  axis 
) const
virtual

Definition at line 296 of file G4ClippablePolygon.cc.

References Empty(), GetMaxPoint(), GetNormal(), GetPlanerExtent(), kCarTolerance, G4INCL::Math::max(), normal, and vertices.

Referenced by G4SolidExtentList::AddSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ClippablePolygon::ClearAllVertices ( )
virtual

Definition at line 75 of file G4ClippablePolygon.cc.

References vertices.

Referenced by G4EllipticalTube::CalculateExtent(), G4EllipticalCone::CalculateExtent(), and G4PolyconeSide::CalculateExtent().

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::Clip ( const G4VoxelLimits voxelLimit)
virtual

Definition at line 84 of file G4ClippablePolygon.cc.

References ClipAlongOneAxis(), G4VoxelLimits::IsLimited(), kXAxis, kYAxis, kZAxis, and vertices.

+ Here is the call graph for this function:

void G4ClippablePolygon::ClipAlongOneAxis ( const G4VoxelLimits voxelLimit,
const EAxis  axis 
)
virtual

Definition at line 401 of file G4ClippablePolygon.cc.

References G4VoxelLimits::AddLimit(), ClipToSimpleLimits(), G4VoxelLimits::GetMaxExtent(), G4VoxelLimits::GetMinExtent(), G4VoxelLimits::IsLimited(), kInfinity, and vertices.

Referenced by Clip(), and PartialClip().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ClippablePolygon::ClipToSimpleLimits ( G4ThreeVectorList pPolygon,
G4ThreeVectorList outputPolygon,
const G4VoxelLimits pVoxelLimit 
)
protected

Definition at line 445 of file G4ClippablePolygon.cc.

References G4VoxelLimits::ClipToLimits(), and G4VoxelLimits::Inside().

Referenced by ClipAlongOneAxis().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::Empty ( ) const
inline

Referenced by BehindOf(), G4SolidExtentList::GetExtent(), and InFrontOf().

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::GetExtent ( const EAxis  axis,
G4double min,
G4double max 
) const
virtual

Definition at line 117 of file G4ClippablePolygon.cc.

References vertices.

Referenced by G4SolidExtentList::AddSurface(), and G4SolidExtentList::GetExtent().

+ Here is the caller graph for this function:

const G4ThreeVector * G4ClippablePolygon::GetMaxPoint ( const EAxis  axis) const
virtual

Definition at line 190 of file G4ClippablePolygon.cc.

References FatalException, G4Exception(), G4INCL::Math::max(), and vertices.

Referenced by BehindOf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const G4ThreeVector * G4ClippablePolygon::GetMinPoint ( const EAxis  axis) const
virtual

Definition at line 159 of file G4ClippablePolygon.cc.

References FatalException, G4Exception(), G4INCL::Math::min(), and vertices.

Referenced by InFrontOf().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const G4ThreeVector G4ClippablePolygon::GetNormal ( ) const
inline

Referenced by BehindOf(), G4SolidExtentList::GetExtent(), and InFrontOf().

+ Here is the caller graph for this function:

G4int G4ClippablePolygon::GetNumVertices ( ) const
inline
G4bool G4ClippablePolygon::GetPlanerExtent ( const G4ThreeVector pointOnPlane,
const G4ThreeVector planeNormal,
G4double min,
G4double max 
) const
virtual

Definition at line 361 of file G4ClippablePolygon.cc.

References vertices.

Referenced by BehindOf(), and InFrontOf().

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::InFrontOf ( const G4ClippablePolygon other,
EAxis  axis 
) const
virtual

Definition at line 231 of file G4ClippablePolygon.cc.

References Empty(), GetMinPoint(), GetNormal(), GetPlanerExtent(), kCarTolerance, G4INCL::Math::min(), normal, and vertices.

Referenced by G4SolidExtentList::AddSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ClippablePolygon::PartialClip ( const G4VoxelLimits voxelLimit,
const EAxis  IgnoreMe 
)
virtual

Definition at line 101 of file G4ClippablePolygon.cc.

References ClipAlongOneAxis(), G4VoxelLimits::IsLimited(), kXAxis, kYAxis, kZAxis, and vertices.

Referenced by G4Hype::AddPolyToExtent(), G4TwistedTubs::AddPolyToExtent(), G4EllipticalTube::CalculateExtent(), G4Hype::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4PolyPhiFace::CalculateExtent(), G4PolyconeSide::CalculateExtent(), and G4PolyhedraSide::CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void G4ClippablePolygon::SetNormal ( const G4ThreeVector newNormal)
inline

Referenced by G4Hype::AddPolyToExtent(), G4TwistedTubs::AddPolyToExtent(), G4EllipticalTube::CalculateExtent(), G4Hype::CalculateExtent(), G4EllipticalCone::CalculateExtent(), G4PolyPhiFace::CalculateExtent(), G4PolyconeSide::CalculateExtent(), and G4PolyhedraSide::CalculateExtent().

+ Here is the caller graph for this function:

Member Data Documentation

G4double G4ClippablePolygon::kCarTolerance
protected

Definition at line 123 of file G4ClippablePolygon.hh.

Referenced by BehindOf(), G4ClippablePolygon(), and InFrontOf().

G4ThreeVector G4ClippablePolygon::normal
protected

Definition at line 122 of file G4ClippablePolygon.hh.

Referenced by BehindOf(), and InFrontOf().


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