Import Geant4 0.1.0 source tree
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
// Declaration of a utility class of a polycon that can be clipped
|
||||
// by a voxel
|
||||
//
|
||||
// ----------------------------------------------------------
|
||||
// This code implementation is the intellectual property of
|
||||
// the GEANT4 collaboration.
|
||||
//
|
||||
// By copying, distributing or modifying the Program (or any work
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
#ifndef G4ClippablePolycon_hh
|
||||
#define G4ClippablePolycon_hh
|
||||
|
||||
@@ -23,18 +31,37 @@ typedef RWTValOrderedVector<G4ThreeVector> G4ThreeVectorList;
|
||||
class G4ClippablePolygon {
|
||||
public:
|
||||
G4ClippablePolygon() {;}
|
||||
~G4ClippablePolygon() {;}
|
||||
virtual ~G4ClippablePolygon() {;}
|
||||
|
||||
void AddVertexInOrder( const G4ThreeVector vertex );
|
||||
void ClearAllVertices();
|
||||
virtual void AddVertexInOrder( const G4ThreeVector vertex );
|
||||
virtual void ClearAllVertices();
|
||||
|
||||
void Clip( const G4VoxelLimits &voxelLimit );
|
||||
virtual void SetNormal( const G4ThreeVector &newNormal ) { normal = newNormal; }
|
||||
virtual const G4ThreeVector GetNormal() const { return normal; }
|
||||
|
||||
void GetExtent( const EAxis axis,
|
||||
G4double &min, G4double &max );
|
||||
virtual const G4bool Clip( const G4VoxelLimits &voxelLimit );
|
||||
|
||||
virtual const G4bool PartialClip( const G4VoxelLimits &voxelLimit, const EAxis IgnoreMe );
|
||||
|
||||
virtual void ClipAlongOneAxis( const G4VoxelLimits &voxelLimit, const EAxis axis );
|
||||
|
||||
virtual const G4bool GetExtent( const EAxis axis,
|
||||
G4double &min, G4double &max ) const;
|
||||
virtual const G4ThreeVector *GetMinPoint( const EAxis axis ) const;
|
||||
virtual const G4ThreeVector *GetMaxPoint( const EAxis axis ) const;
|
||||
|
||||
virtual const G4int GetNumVertices() const { return vertices.entries(); }
|
||||
virtual const G4bool Empty() const { return vertices.entries()==0; }
|
||||
|
||||
virtual const G4bool InFrontOf( const G4ClippablePolygon &other, EAxis axis ) const;
|
||||
virtual const G4bool BehindOf( const G4ClippablePolygon &other, EAxis axis ) const;
|
||||
virtual const G4bool GetPlanerExtent( const G4ThreeVector &pointOnPlane,
|
||||
const G4ThreeVector &planeNormal,
|
||||
G4double &min, G4double &max ) const;
|
||||
|
||||
private:
|
||||
protected:
|
||||
G4ThreeVectorList vertices;
|
||||
G4ThreeVector normal;
|
||||
|
||||
void ClipToSimpleLimits( G4ThreeVectorList& pPolygon,
|
||||
G4ThreeVectorList& outputPolygon,
|
||||
|
||||
Reference in New Issue
Block a user