Geant4  10.03
G4ExtrudedSolid Class Reference

#include <G4ExtrudedSolid.hh>

+ Inheritance diagram for G4ExtrudedSolid:
+ Collaboration diagram for G4ExtrudedSolid:

Classes

struct  ZSection
 

Public Member Functions

 G4ExtrudedSolid (const G4String &pName, const std::vector< G4TwoVector > &polygon, const std::vector< ZSection > &zsections)
 
 G4ExtrudedSolid (const G4String &pName, const std::vector< G4TwoVector > &polygon, G4double halfZ, const G4TwoVector &off1, G4double scale1, const G4TwoVector &off2, G4double scale2)
 
virtual ~G4ExtrudedSolid ()
 
G4int GetNofVertices () const
 
G4TwoVector GetVertex (G4int index) const
 
std::vector< G4TwoVectorGetPolygon () const
 
G4int GetNofZSections () const
 
ZSection GetZSection (G4int index) const
 
std::vector< ZSectionGetZSections () const
 
EInside Inside (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
 
void Extent (G4ThreeVector &pMin, G4ThreeVector &pMax) 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
 
 G4ExtrudedSolid (__void__ &)
 
 G4ExtrudedSolid (const G4ExtrudedSolid &rhs)
 
G4ExtrudedSolidoperator= (const G4ExtrudedSolid &rhs)
 
- Public Member Functions inherited from G4TessellatedSolid
 G4TessellatedSolid ()
 
virtual ~G4TessellatedSolid ()
 
 G4TessellatedSolid (const G4String &name)
 
 G4TessellatedSolid (__void__ &)
 
 G4TessellatedSolid (const G4TessellatedSolid &ts)
 
G4TessellatedSolidoperator= (const G4TessellatedSolid &right)
 
G4TessellatedSolidoperator+= (const G4TessellatedSolid &right)
 
G4bool AddFacet (G4VFacet *aFacet)
 
G4VFacetGetFacet (G4int i) const
 
G4int GetNumberOfFacets () const
 
virtual G4ThreeVector SurfaceNormal (const G4ThreeVector &p) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p, const G4ThreeVector &v) const
 
virtual G4double DistanceToIn (const G4ThreeVector &p) const
 
virtual G4bool Normal (const G4ThreeVector &p, G4ThreeVector &n) const
 
virtual G4double SafetyFromOutside (const G4ThreeVector &p, G4bool aAccurate=false) const
 
virtual G4double SafetyFromInside (const G4ThreeVector &p, G4bool aAccurate=false) const
 
virtual G4ThreeVector GetPointOnSurface () const
 
virtual G4double GetSurfaceArea ()
 
virtual G4double GetCubicVolume ()
 
void SetSolidClosed (const G4bool t)
 
G4bool GetSolidClosed () const
 
void SetMaxVoxels (G4int max)
 
G4SurfaceVoxelizerGetVoxels ()
 
void Extent (G4ThreeVector &pMin, G4ThreeVector &pMax) const
 
G4double GetMinXExtent () const
 
G4double GetMaxXExtent () const
 
G4double GetMinYExtent () const
 
G4double GetMaxYExtent () const
 
G4double GetMinZExtent () const
 
G4double GetMaxZExtent () const
 
virtual G4PolyhedronCreatePolyhedron () const
 
virtual G4PolyhedronGetPolyhedron () const
 
virtual void DescribeYourselfTo (G4VGraphicsScene &scene) const
 
virtual G4VisExtent GetExtent () const
 
G4int AllocatedMemoryWithoutVoxels ()
 
G4int AllocatedMemory ()
 
void DisplayAllocatedMemory ()
 
- 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)
 
G4double EstimateCubicVolume (G4int nStat, G4double epsilon) const
 
G4double EstimateSurfaceArea (G4int nStat, G4double ell) const
 

Private Member Functions

void ComputeProjectionParameters ()
 
G4ThreeVector GetVertex (G4int iz, G4int ind) const
 
G4TwoVector ProjectPoint (const G4ThreeVector &point) const
 
G4bool IsSameLine (const G4TwoVector &p, const G4TwoVector &l1, const G4TwoVector &l2) const
 
G4bool IsSameLineSegment (const G4TwoVector &p, const G4TwoVector &l1, const G4TwoVector &l2) const
 
G4bool IsSameSide (const G4TwoVector &p1, const G4TwoVector &p2, const G4TwoVector &l1, const G4TwoVector &l2) const
 
G4bool IsPointInside (const G4TwoVector &a, const G4TwoVector &b, const G4TwoVector &c, const G4TwoVector &p) const
 
G4double GetAngle (const G4TwoVector &p0, const G4TwoVector &pa, const G4TwoVector &pb) const
 
G4VFacetMakeDownFacet (G4int ind1, G4int ind2, G4int ind3) const
 
G4VFacetMakeUpFacet (G4int ind1, G4int ind2, G4int ind3) const
 
G4bool AddGeneralPolygonFacets ()
 
G4bool MakeFacets ()
 

Private Attributes

G4int fNv
 
G4int fNz
 
std::vector< G4TwoVectorfPolygon
 
std::vector< ZSectionfZSections
 
std::vector< std::vector< G4int > > fTriangles
 
G4bool fIsConvex
 
G4GeometryType fGeometryType
 
std::vector< G4doublefKScales
 
std::vector< G4doublefScale0s
 
std::vector< G4TwoVectorfKOffsets
 
std::vector< G4TwoVectorfOffset0s
 

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
 
- Protected Attributes inherited from G4TessellatedSolid
G4double kCarToleranceHalf
 
- Protected Attributes inherited from G4VSolid
G4double kCarTolerance
 

Detailed Description

Definition at line 83 of file G4ExtrudedSolid.hh.

Constructor & Destructor Documentation

G4ExtrudedSolid::G4ExtrudedSolid ( const G4String pName,
const std::vector< G4TwoVector > &  polygon,
const std::vector< ZSection > &  zsections 
)

Definition at line 70 of file G4ExtrudedSolid.cc.

References ComputeProjectionParameters(), FatalErrorInArgument, FatalException, fIsConvex, fNv, fNz, fPolygon, fZSections, G4Exception(), G4GeomTools::IsConvex(), JustWarning, G4VSolid::kCarTolerance, G4TessellatedSolid::kCarToleranceHalf, MakeFacets(), G4GeomTools::PolygonArea(), G4GeomTools::RemoveRedundantVertices(), and reverse.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ExtrudedSolid::G4ExtrudedSolid ( const G4String pName,
const std::vector< G4TwoVector > &  polygon,
G4double  halfZ,
const G4TwoVector off1,
G4double  scale1,
const G4TwoVector off2,
G4double  scale2 
)

Definition at line 185 of file G4ExtrudedSolid.cc.

References ComputeProjectionParameters(), FatalErrorInArgument, FatalException, fIsConvex, fNv, fPolygon, fZSections, G4Exception(), G4GeomTools::IsConvex(), JustWarning, G4VSolid::kCarTolerance, MakeFacets(), G4GeomTools::PolygonArea(), G4GeomTools::RemoveRedundantVertices(), and reverse.

+ Here is the call graph for this function:

G4ExtrudedSolid::~G4ExtrudedSolid ( )
virtual

Definition at line 321 of file G4ExtrudedSolid.cc.

G4ExtrudedSolid::G4ExtrudedSolid ( __void__ &  a)

Definition at line 275 of file G4ExtrudedSolid.cc.

G4ExtrudedSolid::G4ExtrudedSolid ( const G4ExtrudedSolid rhs)

Definition at line 285 of file G4ExtrudedSolid.cc.

Member Function Documentation

G4bool G4ExtrudedSolid::AddGeneralPolygonFacets ( )
private

Definition at line 588 of file G4ExtrudedSolid.cc.

References G4TessellatedSolid::AddFacet(), angle, c2, FatalException, fNv, fPolygon, fTriangles, G4Exception(), GetAngle(), G4GeometryTolerance::GetAngularTolerance(), G4GeometryTolerance::GetInstance(), IsPointInside(), MakeDownFacet(), MakeUpFacet(), and pi.

Referenced by MakeFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ExtrudedSolid::CalculateExtent ( const EAxis  pAxis,
const G4VoxelLimits pVoxelLimit,
const G4AffineTransform pTransform,
G4double pMin,
G4double pMax 
) const
virtual
G4VSolid * G4ExtrudedSolid::Clone ( ) const
virtual

Reimplemented from G4TessellatedSolid.

Definition at line 801 of file G4ExtrudedSolid.cc.

References G4ExtrudedSolid().

+ Here is the call graph for this function:

void G4ExtrudedSolid::ComputeProjectionParameters ( )
private

Definition at line 328 of file G4ExtrudedSolid.cc.

References fKOffsets, fKScales, fNz, fOffset0s, fScale0s, and fZSections.

Referenced by G4ExtrudedSolid().

+ Here is the caller graph for this function:

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

Reimplemented from G4TessellatedSolid.

Definition at line 881 of file G4ExtrudedSolid.cc.

References G4TessellatedSolid::DistanceToOut(), and fIsConvex.

+ Here is the call graph for this function:

G4double G4ExtrudedSolid::DistanceToOut ( const G4ThreeVector p) const
virtual

Reimplemented from G4TessellatedSolid.

Definition at line 900 of file G4ExtrudedSolid.cc.

References G4TessellatedSolid::DistanceToOut().

+ Here is the call graph for this function:

void G4ExtrudedSolid::Extent ( G4ThreeVector pMin,
G4ThreeVector pMax 
) const
virtual

Reimplemented from G4VSolid.

Definition at line 911 of file G4ExtrudedSolid.cc.

References G4VSolid::DumpInfo(), G4ExtrudedSolid::ZSection::fOffset, fPolygon, G4ExtrudedSolid::ZSection::fScale, G4ExtrudedSolid::ZSection::fZ, G4Exception(), G4VSolid::GetName(), GetNofVertices(), GetNofZSections(), GetZSection(), JustWarning, kInfinity, G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by CalculateExtent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4double G4ExtrudedSolid::GetAngle ( const G4TwoVector p0,
const G4TwoVector pa,
const G4TwoVector pb 
) const
private

Definition at line 502 of file G4ExtrudedSolid.cc.

References pi.

Referenced by AddGeneralPolygonFacets().

+ Here is the caller graph for this function:

G4GeometryType G4ExtrudedSolid::GetEntityType ( ) const
virtual

Reimplemented from G4TessellatedSolid.

Definition at line 792 of file G4ExtrudedSolid.cc.

References fGeometryType.

G4int G4ExtrudedSolid::GetNofVertices ( ) const
inline

Referenced by Extent(), and G4GDMLWriteSolids::XtruWrite().

+ Here is the caller graph for this function:

G4int G4ExtrudedSolid::GetNofZSections ( ) const
inline

Referenced by CalculateExtent(), Extent(), and G4GDMLWriteSolids::XtruWrite().

+ Here is the caller graph for this function:

std::vector<G4TwoVector> G4ExtrudedSolid::GetPolygon ( ) const
inline
G4TwoVector G4ExtrudedSolid::GetVertex ( G4int  index) const
inline

Referenced by MakeDownFacet(), MakeFacets(), MakeUpFacet(), and G4GDMLWriteSolids::XtruWrite().

+ Here is the caller graph for this function:

G4ThreeVector G4ExtrudedSolid::GetVertex ( G4int  iz,
G4int  ind 
) const
private

Definition at line 362 of file G4ExtrudedSolid.cc.

References fPolygon, and fZSections.

ZSection G4ExtrudedSolid::GetZSection ( G4int  index) const
inline

Referenced by CalculateExtent(), Extent(), and G4GDMLWriteSolids::XtruWrite().

+ Here is the caller graph for this function:

std::vector<ZSection> G4ExtrudedSolid::GetZSections ( ) const
inline
EInside G4ExtrudedSolid::Inside ( const G4ThreeVector p) const
virtual
G4bool G4ExtrudedSolid::IsPointInside ( const G4TwoVector a,
const G4TwoVector b,
const G4TwoVector c,
const G4TwoVector p 
) const
private

Definition at line 471 of file G4ExtrudedSolid.cc.

References IsSameLineSegment(), and IsSameSide().

Referenced by AddGeneralPolygonFacets(), and Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ExtrudedSolid::IsSameLine ( const G4TwoVector p,
const G4TwoVector l1,
const G4TwoVector l2 
) const
private

Definition at line 406 of file G4ExtrudedSolid.cc.

References G4TessellatedSolid::kCarToleranceHalf.

Referenced by IsSameLineSegment().

+ Here is the caller graph for this function:

G4bool G4ExtrudedSolid::IsSameLineSegment ( const G4TwoVector p,
const G4TwoVector l1,
const G4TwoVector l2 
) const
private

Definition at line 436 of file G4ExtrudedSolid.cc.

References IsSameLine(), G4TessellatedSolid::kCarToleranceHalf, G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by Inside(), and IsPointInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ExtrudedSolid::IsSameSide ( const G4TwoVector p1,
const G4TwoVector p2,
const G4TwoVector l1,
const G4TwoVector l2 
) const
private

Definition at line 456 of file G4ExtrudedSolid.cc.

Referenced by IsPointInside().

+ Here is the caller graph for this function:

G4VFacet * G4ExtrudedSolid::MakeDownFacet ( G4int  ind1,
G4int  ind2,
G4int  ind3 
) const
private

Definition at line 521 of file G4ExtrudedSolid.cc.

References ABSOLUTE, and GetVertex().

Referenced by AddGeneralPolygonFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4bool G4ExtrudedSolid::MakeFacets ( )
private

Definition at line 712 of file G4ExtrudedSolid.cc.

References ABSOLUTE, G4TessellatedSolid::AddFacet(), AddGeneralPolygonFacets(), fNv, fNz, fTriangles, GetVertex(), and G4TessellatedSolid::SetSolidClosed().

Referenced by G4ExtrudedSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4VFacet * G4ExtrudedSolid::MakeUpFacet ( G4int  ind1,
G4int  ind2,
G4int  ind3 
) const
private

Definition at line 555 of file G4ExtrudedSolid.cc.

References ABSOLUTE, fNz, and GetVertex().

Referenced by AddGeneralPolygonFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

G4ExtrudedSolid & G4ExtrudedSolid::operator= ( const G4ExtrudedSolid rhs)

Definition at line 297 of file G4ExtrudedSolid.cc.

References fGeometryType, fIsConvex, fKOffsets, fKScales, fNv, fNz, fOffset0s, fPolygon, fScale0s, fTriangles, fZSections, and G4TessellatedSolid::operator=().

+ Here is the call graph for this function:

G4TwoVector G4ExtrudedSolid::ProjectPoint ( const G4ThreeVector point) const
private

Definition at line 375 of file G4ExtrudedSolid.cc.

References fKOffsets, fKScales, fNz, fOffset0s, fScale0s, fZSections, and G4InuclParticleNames::z0.

Referenced by Inside().

+ Here is the caller graph for this function:

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

Reimplemented from G4TessellatedSolid.

Definition at line 1059 of file G4ExtrudedSolid.cc.

References fGeometryType, fIsConvex, fNv, fNz, fPolygon, fZSections, G4endl, G4VSolid::GetName(), and mm.

+ Here is the call graph for this function:

Member Data Documentation

G4GeometryType G4ExtrudedSolid::fGeometryType
private

Definition at line 193 of file G4ExtrudedSolid.hh.

Referenced by GetEntityType(), operator=(), and StreamInfo().

G4bool G4ExtrudedSolid::fIsConvex
private

Definition at line 192 of file G4ExtrudedSolid.hh.

Referenced by DistanceToOut(), G4ExtrudedSolid(), operator=(), and StreamInfo().

std::vector<G4TwoVector> G4ExtrudedSolid::fKOffsets
private

Definition at line 197 of file G4ExtrudedSolid.hh.

Referenced by ComputeProjectionParameters(), operator=(), and ProjectPoint().

std::vector<G4double> G4ExtrudedSolid::fKScales
private

Definition at line 195 of file G4ExtrudedSolid.hh.

Referenced by ComputeProjectionParameters(), operator=(), and ProjectPoint().

G4int G4ExtrudedSolid::fNv
private
G4int G4ExtrudedSolid::fNz
private
std::vector<G4TwoVector> G4ExtrudedSolid::fOffset0s
private

Definition at line 198 of file G4ExtrudedSolid.hh.

Referenced by ComputeProjectionParameters(), operator=(), and ProjectPoint().

std::vector<G4TwoVector> G4ExtrudedSolid::fPolygon
private
std::vector<G4double> G4ExtrudedSolid::fScale0s
private

Definition at line 196 of file G4ExtrudedSolid.hh.

Referenced by ComputeProjectionParameters(), operator=(), and ProjectPoint().

std::vector< std::vector<G4int> > G4ExtrudedSolid::fTriangles
private

Definition at line 191 of file G4ExtrudedSolid.hh.

Referenced by AddGeneralPolygonFacets(), Inside(), MakeFacets(), and operator=().

std::vector<ZSection> G4ExtrudedSolid::fZSections
private

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