Geant4  10.01.p01
UExtrudedSolid Class Reference

#include <UExtrudedSolid.hh>

+ Inheritance diagram for UExtrudedSolid:
+ Collaboration diagram for UExtrudedSolid:

Classes

struct  ZSection
 

Public Member Functions

 UExtrudedSolid (const std::string &pName, std::vector< UVector2 > polygon, std::vector< ZSection > zsections)
 
 UExtrudedSolid (const std::string &pName, std::vector< UVector2 > polygon, double halfZ, UVector2 off1, double scale1, UVector2 off2, double scale2)
 
virtual ~UExtrudedSolid ()
 
int GetNofVertices () const
 
UVector2 GetVertex (int index) const
 
std::vector< UVector2GetPolygon () const
 
int GetNofZSections () const
 
ZSection GetZSection (int index) const
 
std::vector< ZSectionGetZSections () const
 
EnumInside Inside (const UVector3 &aPoint) const
 
double DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
UGeometryType GetEntityType () const
 
VUSolidClone () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
 UExtrudedSolid ()
 
 UExtrudedSolid (const UExtrudedSolid &rhs)
 
UExtrudedSolidoperator= (const UExtrudedSolid &rhs)
 
void Initialise (std::vector< UVector2 > &polygon, std::vector< ZSection > &zsections)
 
void Initialise (std::vector< UVector2 > &polygon, double dz, UVector2 off1, double scale1, UVector2 off2, double scale2)
 
- Public Member Functions inherited from UTessellatedSolid
 UTessellatedSolid ()
 
virtual ~UTessellatedSolid ()
 
 UTessellatedSolid (const std::string &name)
 
 UTessellatedSolid (__void__ &)
 
 UTessellatedSolid (const UTessellatedSolid &s)
 
UTessellatedSolidoperator= (const UTessellatedSolid &s)
 
UTessellatedSolidoperator+= (const UTessellatedSolid &right)
 
bool AddFacet (VUFacet *aFacet)
 
VUFacetGetFacet (int i) const
 
int GetNumberOfFacets () const
 
virtual double GetSurfaceArea ()
 
virtual bool Normal (const UVector3 &p, UVector3 &aNormal) const
 
virtual double SafetyFromOutside (const UVector3 &p, bool aAccurate=false) const
 
void SetSolidClosed (const bool t)
 
bool GetSolidClosed () const
 
virtual UVector3 GetPointOnSurface () const
 
virtual double Capacity ()
 
virtual double SurfaceArea ()
 
virtual void GetParametersList (int, double *) const
 
virtual void ComputeBBox (UBBox *, bool)
 
void SetMaxVoxels (int max)
 
UVoxelizerGetVoxels ()
 
double GetMinXExtent () const
 
double GetMaxXExtent () const
 
double GetMinYExtent () const
 
double GetMaxYExtent () const
 
double GetMinZExtent () const
 
double GetMaxZExtent () const
 
virtual double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 
int AllocatedMemoryWithoutVoxels ()
 
int AllocatedMemory ()
 
void DisplayAllocatedMemory ()
 
- Public Member Functions inherited from VUSolid
 VUSolid ()
 
 VUSolid (const std::string &name)
 
virtual ~VUSolid ()
 
double GetCarTolerance () const
 
double GetRadTolerance () const
 
double GetAngTolerance () const
 
void SetCarTolerance (double eps)
 
void SetRadTolerance (double eps)
 
void SetAngTolerance (double eps)
 
virtual void ExtentAxis (EAxisType aAxis, double &aMin, double &aMax) const
 
const std::string & GetName () const
 
void SetName (const std::string &aName)
 
virtual void SamplePointsInside (int, UVector3 *) const
 
virtual void SamplePointsOnSurface (int, UVector3 *) const
 
virtual void SamplePointsOnEdge (int, UVector3 *) const
 
double EstimateCubicVolume (int nStat, double epsilon) const
 
double EstimateSurfaceArea (int nStat, double ell) const
 

Private Member Functions

void ComputeProjectionParameters ()
 
UVector3 GetVertex (int iz, int ind) const
 
UVector2 ProjectPoint (const UVector3 &point) const
 
bool IsSameLine (UVector2 p, UVector2 l1, UVector2 l2) const
 
bool IsSameLineSegment (UVector2 p, UVector2 l1, UVector2 l2) const
 
bool IsSameSide (UVector2 p1, UVector2 p2, UVector2 l1, UVector2 l2) const
 
bool IsPointInside (UVector2 a, UVector2 b, UVector2 c, UVector2 p) const
 
double GetAngle (UVector2 p0, UVector2 pa, UVector2 pb) const
 
VUFacetMakeDownFacet (int ind1, int ind2, int ind3) const
 
VUFacetMakeUpFacet (int ind1, int ind2, int ind3) const
 
bool AddGeneralPolygonFacets ()
 
bool MakeFacets ()
 
bool IsConvex () const
 

Private Attributes

int fNv
 
int fNz
 
std::vector< UVector2fPolygon
 
std::vector< ZSectionfZSections
 
std::vector< std::vector< int > > fTriangles
 
bool fIsConvex
 
UGeometryType fGeometryType
 
std::vector< double > fKScales
 
std::vector< double > fScale0s
 
std::vector< UVector2fKOffsets
 
std::vector< UVector2fOffset0s
 

Additional Inherited Members

- Public Types inherited from VUSolid
enum  EnumInside { eInside =0, eSurface =1, eOutside =2 }
 
enum  EAxisType { eXaxis =0, eYaxis =1, eZaxis =2 }
 
- Static Public Member Functions inherited from VUSolid
static double Tolerance ()
 
- Static Protected Attributes inherited from VUSolid
static double fgTolerance = 1.0E-9
 
static double frTolerance = 1.0E-9
 
static double faTolerance = 1.0E-9
 

Detailed Description

Definition at line 52 of file UExtrudedSolid.hh.

Constructor & Destructor Documentation

UExtrudedSolid::UExtrudedSolid ( const std::string &  pName,
std::vector< UVector2 polygon,
std::vector< ZSection zsections 
)

Definition at line 28 of file UExtrudedSolid.cc.

References Initialise().

+ Here is the call graph for this function:

UExtrudedSolid::UExtrudedSolid ( const std::string &  pName,
std::vector< UVector2 polygon,
double  halfZ,
UVector2  off1,
double  scale1,
UVector2  off2,
double  scale2 
)

Definition at line 46 of file UExtrudedSolid.cc.

References Initialise().

+ Here is the call graph for this function:

UExtrudedSolid::~UExtrudedSolid ( )
virtual

Definition at line 120 of file UExtrudedSolid.cc.

UExtrudedSolid::UExtrudedSolid ( )

Definition at line 66 of file UExtrudedSolid.cc.

Referenced by Clone().

+ Here is the caller graph for this function:

UExtrudedSolid::UExtrudedSolid ( const UExtrudedSolid rhs)

Definition at line 76 of file UExtrudedSolid.cc.

Member Function Documentation

bool UExtrudedSolid::AddGeneralPolygonFacets ( )
private

Definition at line 545 of file UExtrudedSolid.cc.

References UTessellatedSolid::AddFacet(), c1, c2, c3, UUtils::Exception(), FatalError, fNv, fPolygon, fTriangles, GetAngle(), IsPointInside(), UUtils::kPi, MakeDownFacet(), and MakeUpFacet().

Referenced by MakeFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid * UExtrudedSolid::Clone ( ) const
virtual

Reimplemented from UTessellatedSolid.

Definition at line 788 of file UExtrudedSolid.cc.

References UExtrudedSolid().

+ Here is the call graph for this function:

void UExtrudedSolid::ComputeProjectionParameters ( )
private

Definition at line 301 of file UExtrudedSolid.cc.

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

Referenced by Initialise().

+ Here is the caller graph for this function:

double UExtrudedSolid::DistanceToOut ( const UVector3 aPoint,
const UVector3 aDirection,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
virtual

Reimplemented from UTessellatedSolid.

Definition at line 858 of file UExtrudedSolid.cc.

References UTessellatedSolid::DistanceToOut(), and fIsConvex.

+ Here is the call graph for this function:

double UExtrudedSolid::GetAngle ( UVector2  p0,
UVector2  pa,
UVector2  pb 
) const
private

Definition at line 467 of file UExtrudedSolid.cc.

References UUtils::kPi, UVector2::x, and UVector2::y.

Referenced by AddGeneralPolygonFacets().

+ Here is the caller graph for this function:

UGeometryType UExtrudedSolid::GetEntityType ( ) const
inlinevirtual

Reimplemented from UTessellatedSolid.

Definition at line 104 of file UExtrudedSolid.hh.

int UExtrudedSolid::GetNofVertices ( ) const
inline

Referenced by G4UExtrudedSolid::GetNofVertices().

+ Here is the caller graph for this function:

int UExtrudedSolid::GetNofZSections ( ) const
inline

Referenced by G4UExtrudedSolid::GetNofZSections().

+ Here is the caller graph for this function:

std::vector<UVector2> UExtrudedSolid::GetPolygon ( ) const
inline

Referenced by G4UExtrudedSolid::GetPolygon().

+ Here is the caller graph for this function:

UVector2 UExtrudedSolid::GetVertex ( int  index) const
inline

Referenced by G4UExtrudedSolid::GetVertex(), MakeDownFacet(), MakeFacets(), and MakeUpFacet().

+ Here is the caller graph for this function:

UVector3 UExtrudedSolid::GetVertex ( int  iz,
int  ind 
) const
private

Definition at line 335 of file UExtrudedSolid.cc.

References fPolygon, and fZSections.

ZSection UExtrudedSolid::GetZSection ( int  index) const
inline
std::vector<ZSection> UExtrudedSolid::GetZSections ( ) const
inline

Referenced by G4UExtrudedSolid::GetZSections().

+ Here is the caller graph for this function:

void UExtrudedSolid::Initialise ( std::vector< UVector2 > &  polygon,
std::vector< ZSection > &  zsections 
)

Definition at line 127 of file UExtrudedSolid.cc.

References ComputeProjectionParameters(), UUtils::Exception(), FatalError, FatalErrorInArguments, VUSolid::fgTolerance, fIsConvex, fNv, fNz, fPolygon, fZSections, VUSolid::GetName(), IsConvex(), MakeFacets(), and Warning.

Referenced by G4UExtrudedSolid::G4UExtrudedSolid(), and UExtrudedSolid().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UExtrudedSolid::Initialise ( std::vector< UVector2 > &  polygon,
double  dz,
UVector2  off1,
double  scale1,
UVector2  off2,
double  scale2 
)

Definition at line 227 of file UExtrudedSolid.cc.

References ComputeProjectionParameters(), UUtils::Exception(), FatalError, FatalErrorInArguments, fIsConvex, fNv, fPolygon, fZSections, VUSolid::GetName(), IsConvex(), MakeFacets(), and Warning.

+ Here is the call graph for this function:

VUSolid::EnumInside UExtrudedSolid::Inside ( const UVector3 aPoint) const
virtual
bool UExtrudedSolid::IsConvex ( ) const
private

Definition at line 752 of file UExtrudedSolid.cc.

References fNv, fPolygon, UUtils::kPi, and UVector2::phi().

Referenced by Initialise().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UExtrudedSolid::IsPointInside ( UVector2  a,
UVector2  b,
UVector2  c,
UVector2  p 
) const
private

Definition at line 438 of file UExtrudedSolid.cc.

References IsSameLineSegment(), IsSameSide(), UVector2::x, and UVector2::y.

Referenced by AddGeneralPolygonFacets(), and Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UExtrudedSolid::IsSameLine ( UVector2  p,
UVector2  l1,
UVector2  l2 
) const
private

Definition at line 377 of file UExtrudedSolid.cc.

References VUSolid::fgTolerance, UVector2::x, and UVector2::y.

Referenced by IsSameLineSegment().

+ Here is the caller graph for this function:

bool UExtrudedSolid::IsSameLineSegment ( UVector2  p,
UVector2  l1,
UVector2  l2 
) const
private

Definition at line 406 of file UExtrudedSolid.cc.

References VUSolid::fgTolerance, IsSameLine(), G4INCL::Math::max(), G4INCL::Math::min(), UVector2::x, and UVector2::y.

Referenced by Inside(), and IsPointInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UExtrudedSolid::IsSameSide ( UVector2  p1,
UVector2  p2,
UVector2  l1,
UVector2  l2 
) const
private

Definition at line 425 of file UExtrudedSolid.cc.

References UVector2::x, and UVector2::y.

Referenced by IsPointInside().

+ Here is the caller graph for this function:

VUFacet * UExtrudedSolid::MakeDownFacet ( int  ind1,
int  ind2,
int  ind3 
) const
private

Definition at line 484 of file UExtrudedSolid.cc.

References GetVertex(), UABSOLUTE, and UVector3::z.

Referenced by AddGeneralPolygonFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UExtrudedSolid::MakeFacets ( )
private

Definition at line 658 of file UExtrudedSolid.cc.

References UTessellatedSolid::AddFacet(), AddGeneralPolygonFacets(), fNv, fNz, fTriangles, GetVertex(), iz, UTessellatedSolid::SetSolidClosed(), and UABSOLUTE.

Referenced by Initialise().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUFacet * UExtrudedSolid::MakeUpFacet ( int  ind1,
int  ind2,
int  ind3 
) const
private

Definition at line 515 of file UExtrudedSolid.cc.

References fNz, GetVertex(), UABSOLUTE, and UVector3::z.

Referenced by AddGeneralPolygonFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 88 of file UExtrudedSolid.cc.

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

+ Here is the call graph for this function:

UVector2 UExtrudedSolid::ProjectPoint ( const UVector3 point) const
private

Definition at line 348 of file UExtrudedSolid.cc.

References fKOffsets, fKScales, fNz, fOffset0s, fScale0s, fZSections, iz, UVector3::x, UVector3::y, UVector3::z, and G4InuclParticleNames::z0.

Referenced by Inside().

+ Here is the caller graph for this function:

double UExtrudedSolid::SafetyFromInside ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Reimplemented from UTessellatedSolid.

Definition at line 878 of file UExtrudedSolid.cc.

References UTessellatedSolid::SafetyFromInside().

+ Here is the call graph for this function:

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

Reimplemented from UTessellatedSolid.

Definition at line 887 of file UExtrudedSolid.cc.

References fGeometryType, fIsConvex, fNv, fNz, fPolygon, fZSections, VUSolid::GetName(), and iz.

+ Here is the call graph for this function:

Member Data Documentation

UGeometryType UExtrudedSolid::fGeometryType
private

Definition at line 163 of file UExtrudedSolid.hh.

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

bool UExtrudedSolid::fIsConvex
private

Definition at line 162 of file UExtrudedSolid.hh.

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

std::vector<UVector2> UExtrudedSolid::fKOffsets
private

Definition at line 167 of file UExtrudedSolid.hh.

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

std::vector<double> UExtrudedSolid::fKScales
private

Definition at line 165 of file UExtrudedSolid.hh.

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

int UExtrudedSolid::fNv
private
int UExtrudedSolid::fNz
private
std::vector<UVector2> UExtrudedSolid::fOffset0s
private

Definition at line 168 of file UExtrudedSolid.hh.

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

std::vector<UVector2> UExtrudedSolid::fPolygon
private
std::vector<double> UExtrudedSolid::fScale0s
private

Definition at line 166 of file UExtrudedSolid.hh.

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

std::vector< std::vector<int> > UExtrudedSolid::fTriangles
private

Definition at line 161 of file UExtrudedSolid.hh.

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

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

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