Geant4  10.00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4GenericTrap Class Reference
Inheritance diagram for G4GenericTrap:
G4VSolid

Public Member Functions

 G4GenericTrap (const G4String &name, G4double halfZ, const std::vector< G4TwoVector > &vertices)
 
 ~G4GenericTrap ()
 
G4double GetZHalfLength () const
 
G4int GetNofVertices () const
 
G4TwoVector GetVertex (G4int index) const
 
const std::vector< G4TwoVector > & GetVertices () const
 
G4double GetTwistAngle (G4int index) const
 
G4bool IsTwisted () const
 
G4int GetVisSubdivisions () const
 
void SetVisSubdivisions (G4int subdiv)
 
EInside Inside (const G4ThreeVector &p) const
 
G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
G4double DistanceToIn (const G4ThreeVector &p) const
 
G4double DistanceToOut (const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const
 
G4double DistanceToOut (const G4ThreeVector &p) const
 
G4bool CalculateExtent (const EAxis pAxis, const G4VoxelLimits &pVoxelLimit, const G4AffineTransform &pTransform, G4double &pmin, G4double &pmax) const
 
G4GeometryType GetEntityType () const
 
G4VSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
G4ThreeVector GetPointOnSurface () const
 
G4double GetCubicVolume ()
 
G4double GetSurfaceArea ()
 
G4PolyhedronGetPolyhedron () const
 
void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
G4VisExtent GetExtent () const
 
G4PolyhedronCreatePolyhedron () const
 
 G4GenericTrap (__void__ &)
 
 G4GenericTrap (const G4GenericTrap &rhs)
 
G4GenericTrapoperator= (const G4GenericTrap &rhs)
 
- Public Member Functions inherited from G4VSolid
 G4VSolid (const G4String &name)
 
virtual ~G4VSolid ()
 
G4bool operator== (const G4VSolid &s) const
 
G4String GetName () const
 
void SetName (const G4String &name)
 
G4double GetTolerance () const
 
virtual void ComputeDimensions (G4VPVParameterisation *p, const G4int n, const G4VPhysicalVolume *pRep)
 
void DumpInfo () const
 
virtual const G4VSolidGetConstituentSolid (G4int no) const
 
virtual G4VSolidGetConstituentSolid (G4int no)
 
virtual const G4DisplacedSolidGetDisplacedSolidPtr () const
 
virtual G4DisplacedSolidGetDisplacedSolidPtr ()
 
 G4VSolid (__void__ &)
 
 G4VSolid (const G4VSolid &rhs)
 
G4VSolidoperator= (const G4VSolid &rhs)
 

Protected Attributes

G4PolyhedronfpPolyhedron
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Private Types

enum  ESide {
  kUndefined, kXY0, kXY1, kXY2,
  kXY3, kMZ, kPZ
}
 

Private Member Functions

void SetTwistAngle (G4int index, G4double twist)
 
G4bool ComputeIsTwisted ()
 
G4bool CheckOrder (const std::vector< G4TwoVector > &vertices) const
 
G4bool IsSegCrossing (const G4TwoVector &a, const G4TwoVector &b, const G4TwoVector &c, const G4TwoVector &d) const
 
G4bool IsSegCrossingZ (const G4TwoVector &a, const G4TwoVector &b, const G4TwoVector &c, const G4TwoVector &d) const
 
G4ThreeVectorListCreateRotatedVertices (const G4AffineTransform &pTransform) const
 
void ReorderVertices (std::vector< G4ThreeVector > &vertices) const
 
void ComputeBBox ()
 
G4ThreeVector GetMinimumBBox () const
 
G4ThreeVector GetMaximumBBox () const
 
G4VFacetMakeDownFacet (const std::vector< G4ThreeVector > &fromVertices, G4int ind1, G4int ind2, G4int ind3) const
 
G4VFacetMakeUpFacet (const std::vector< G4ThreeVector > &fromVertices, G4int ind1, G4int ind2, G4int ind3) const
 
G4VFacetMakeSideFacet (const G4ThreeVector &downVertex0, const G4ThreeVector &downVertex1, const G4ThreeVector &upVertex1, const G4ThreeVector &upVertex0) const
 
G4TessellatedSolidCreateTessellatedSolid () const
 
EInside InsidePolygone (const G4ThreeVector &p, const std::vector< G4TwoVector > &poly) const
 
G4double DistToPlane (const G4ThreeVector &p, const G4ThreeVector &v, const G4int ipl) const
 
G4double DistToTriangle (const G4ThreeVector &p, const G4ThreeVector &v, const G4int ipl) const
 
G4ThreeVector NormalToPlane (const G4ThreeVector &p, const G4int ipl) const
 
G4double SafetyToFace (const G4ThreeVector &p, const G4int iseg) const
 
G4double GetFaceSurfaceArea (const G4ThreeVector &p0, const G4ThreeVector &p1, const G4ThreeVector &p2, const G4ThreeVector &p3) const
 

Private Attributes

G4double halfCarTolerance
 
G4double fDz
 
std::vector< G4TwoVectorfVertices
 
G4bool fIsTwisted
 
G4double fTwist [4]
 
G4TessellatedSolidfTessellatedSolid
 
G4ThreeVector fMinBBoxVector
 
G4ThreeVector fMaxBBoxVector
 
G4int fVisSubdivisions
 
G4double fSurfaceArea
 
G4double fCubicVolume
 

Static Private Attributes

static const G4int fgkNofVertices
 
static const G4double fgkTolerance
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSolid
void CalculateClippedPolygonExtent (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipCrossSection (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipBetweenSections (G4ThreeVectorList *pVertices, const G4int pSectionIndex, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis, G4double &pMin, G4double &pMax) const
 
void ClipPolygon (G4ThreeVectorList &pPolygon, const G4VoxelLimits &pVoxelLimit, const EAxis pAxis) const
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Member Enumeration Documentation

enum ESide
private
Enumerator
kUndefined 
kXY0 
kXY1 
kXY2 
kXY3 
kMZ 
kPZ 

Constructor & Destructor Documentation

G4GenericTrap ( const G4String name,
G4double  halfZ,
const std::vector< G4TwoVector > &  vertices 
)
G4GenericTrap ( __void__ &  )

Member Function Documentation

G4double GetZHalfLength ( ) const
G4int GetNofVertices ( ) const
G4TwoVector GetVertex ( G4int  index) const
const std::vector<G4TwoVector>& GetVertices ( ) const
G4double GetTwistAngle ( G4int  index) const
G4bool IsTwisted ( ) const
G4int GetVisSubdivisions ( ) const
void SetVisSubdivisions ( G4int  subdiv)
EInside Inside ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

G4ThreeVector SurfaceNormal ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

G4double DistanceToIn ( const G4ThreeVector p,
const G4ThreeVector v 
) const
virtual

Implements G4VSolid.

G4double DistanceToIn ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

G4double DistanceToOut ( const G4ThreeVector p,
const G4ThreeVector v,
const G4bool  calcNorm = false,
G4bool validNorm = 0,
G4ThreeVector n = 0 
) const
virtual

Implements G4VSolid.

G4double DistanceToOut ( const G4ThreeVector p) const
virtual

Implements G4VSolid.

G4bool CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pmin,
G4double pmax 
) const
virtual

Implements G4VSolid.

G4GeometryType GetEntityType ( ) const
virtual

Implements G4VSolid.

G4VSolid* Clone ( ) const
virtual

Reimplemented from G4VSolid.

std::ostream& StreamInfo ( std::ostream &  os) const
virtual

Implements G4VSolid.

G4ThreeVector GetPointOnSurface ( ) const
virtual

Reimplemented from G4VSolid.

G4double GetCubicVolume ( )
virtual

Reimplemented from G4VSolid.

G4double GetSurfaceArea ( )
virtual

Reimplemented from G4VSolid.

G4Polyhedron* GetPolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

void DescribeYourselfTo ( G4VGraphicsScene scene) const
virtual

Implements G4VSolid.

G4VisExtent GetExtent ( ) const
virtual

Reimplemented from G4VSolid.

G4Polyhedron* CreatePolyhedron ( ) const
virtual

Reimplemented from G4VSolid.

G4GenericTrap& operator= ( const G4GenericTrap rhs)
void SetTwistAngle ( G4int  index,
G4double  twist 
)
private
G4bool ComputeIsTwisted ( )
private
G4bool CheckOrder ( const std::vector< G4TwoVector > &  vertices) const
private
G4bool IsSegCrossing ( const G4TwoVector a,
const G4TwoVector b,
const G4TwoVector c,
const G4TwoVector d 
) const
private
G4bool IsSegCrossingZ ( const G4TwoVector a,
const G4TwoVector b,
const G4TwoVector c,
const G4TwoVector d 
) const
private
G4ThreeVectorList* CreateRotatedVertices ( const G4AffineTransform pTransform) const
private
void ReorderVertices ( std::vector< G4ThreeVector > &  vertices) const
private
void ComputeBBox ( )
private
G4ThreeVector GetMinimumBBox ( ) const
private
G4ThreeVector GetMaximumBBox ( ) const
private
G4VFacet* MakeDownFacet ( const std::vector< G4ThreeVector > &  fromVertices,
G4int  ind1,
G4int  ind2,
G4int  ind3 
) const
private
G4VFacet* MakeUpFacet ( const std::vector< G4ThreeVector > &  fromVertices,
G4int  ind1,
G4int  ind2,
G4int  ind3 
) const
private
G4VFacet* MakeSideFacet ( const G4ThreeVector downVertex0,
const G4ThreeVector downVertex1,
const G4ThreeVector upVertex1,
const G4ThreeVector upVertex0 
) const
private
G4TessellatedSolid* CreateTessellatedSolid ( ) const
private
EInside InsidePolygone ( const G4ThreeVector p,
const std::vector< G4TwoVector > &  poly 
) const
private
G4double DistToPlane ( const G4ThreeVector p,
const G4ThreeVector v,
const G4int  ipl 
) const
private
G4double DistToTriangle ( const G4ThreeVector p,
const G4ThreeVector v,
const G4int  ipl 
) const
private
G4ThreeVector NormalToPlane ( const G4ThreeVector p,
const G4int  ipl 
) const
private
G4double SafetyToFace ( const G4ThreeVector p,
const G4int  iseg 
) const
private
G4double GetFaceSurfaceArea ( const G4ThreeVector p0,
const G4ThreeVector p1,
const G4ThreeVector p2,
const G4ThreeVector p3 
) const
private

Member Data Documentation

G4Polyhedron* fpPolyhedron
mutableprotected
const G4int fgkNofVertices
staticprivate
const G4double fgkTolerance
staticprivate
G4double halfCarTolerance
private
G4double fDz
private
std::vector<G4TwoVector> fVertices
private
G4bool fIsTwisted
private
G4double fTwist[4]
private
G4TessellatedSolid* fTessellatedSolid
private
G4ThreeVector fMinBBoxVector
private
G4ThreeVector fMaxBBoxVector
private
G4int fVisSubdivisions
private
G4double fSurfaceArea
private
G4double fCubicVolume
private