Geant4  10.01.p02
UVCSGfaceted Class Reference

#include <UVCSGfaceted.hh>

+ Inheritance diagram for UVCSGfaceted:
+ Collaboration diagram for UVCSGfaceted:

Public Member Functions

 UVCSGfaceted (const std::string &name)
 
virtual ~UVCSGfaceted ()
 
 UVCSGfaceted (const UVCSGfaceted &source)
 
UVCSGfacetedoperator= (const UVCSGfaceted &source)
 
VUSolid::EnumInside InsideNoVoxels (const UVector3 &p) const
 
virtual VUSolid::EnumInside Inside (const UVector3 &p) const
 
virtual bool Normal (const UVector3 &p, UVector3 &n) const
 
double DistanceToInNoVoxels (const UVector3 &p, const UVector3 &v) const
 
virtual double DistanceToIn (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
virtual double SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const
 
double DistanceTo (const UVector3 &p, const bool outgoing) const
 
double DistanceToOutNoVoxels (const UVector3 &p, const UVector3 &v, UVector3 &n, bool &aConvex) const
 
virtual double DistanceToOut (const UVector3 &p, const UVector3 &v, UVector3 &n, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
virtual double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
virtual double SafetyFromInsideNoVoxels (const UVector3 &aPoint, bool aAccurate=false) const
 
virtual UGeometryType GetEntityType () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
int GetCubVolStatistics () const
 
double GetCubVolEpsilon () const
 
void SetCubVolStatistics (int st)
 
void SetCubVolEpsilon (double ep)
 
int GetAreaStatistics () const
 
double GetAreaAccuracy () const
 
void SetAreaStatistics (int st)
 
void SetAreaAccuracy (double ep)
 
virtual double Capacity ()
 
virtual double SurfaceArea ()
 
- 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
 
virtual void Extent (UVector3 &aMin, UVector3 &aMax) const =0
 
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
 
virtual void GetParametersList (int aNumber, double *aArray) const =0
 
virtual VUSolidClone () const =0
 
virtual UVector3 GetPointOnSurface () const =0
 
double EstimateCubicVolume (int nStat, double epsilon) const
 
double EstimateSurfaceArea (int nStat, double ell) const
 

Protected Member Functions

double SafetyFromInsideSection (int index, const UVector3 &p, UBits &bits) const
 
int GetSection (double z) const
 
UVector3 GetPointOnSurfaceGeneric () const
 
void CopyStuff (const UVCSGfaceted &source)
 
void DeleteStuff ()
 
void FindCandidates (double z, std::vector< int > &candidates, bool sides=false)
 
void InitVoxels (UReduciblePolygon &z, double radius)
 
- Protected Member Functions inherited from VUSolid
virtual void ComputeBBox (UBBox *aBox, bool aStore=false)=0
 

Protected Attributes

int numFace
 
UVCSGface ** faces
 
double fCubicVolume
 
double fSurfaceArea
 
std::vector< double > fZs
 
std::vector< std::vector< int > > fCandidates
 
int fMaxSection
 
UBox fBox
 
double fBoxShift
 
bool fNoVoxels
 

Private Attributes

int fStatistics
 
double fCubVolEpsilon
 
double fAreaAccuracy
 

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 33 of file UVCSGfaceted.hh.

Constructor & Destructor Documentation

UVCSGfaceted::UVCSGfaceted ( const std::string &  name)

Definition at line 31 of file UVCSGfaceted.cc.

UVCSGfaceted::~UVCSGfaceted ( )
virtual

Definition at line 41 of file UVCSGfaceted.cc.

References DeleteStuff().

+ Here is the call graph for this function:

UVCSGfaceted::UVCSGfaceted ( const UVCSGfaceted source)

Definition at line 49 of file UVCSGfaceted.cc.

References CopyStuff(), fAreaAccuracy, fCubVolEpsilon, and fStatistics.

+ Here is the call graph for this function:

Member Function Documentation

double UVCSGfaceted::Capacity ( )
virtual

Implements VUSolid.

Definition at line 520 of file UVCSGfaceted.cc.

References VUSolid::EstimateCubicVolume(), fCubicVolume, fCubVolEpsilon, and fStatistics.

+ Here is the call graph for this function:

void UVCSGfaceted::CopyStuff ( const UVCSGfaceted source)
protected

Definition at line 91 of file UVCSGfaceted.cc.

References UVCSGface::Clone(), faces, fBox, fBoxShift, fCubicVolume, fMaxSection, fNoVoxels, fSurfaceArea, fZs, and numFace.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UVCSGfaceted::DeleteStuff ( )
protected

Definition at line 124 of file UVCSGfaceted.cc.

References faces, and numFace.

Referenced by UPolyhedra::Reset(), and ~UVCSGfaceted().

+ Here is the caller graph for this function:

double UVCSGfaceted::DistanceTo ( const UVector3 p,
const bool  outgoing 
) const

Definition at line 400 of file UVCSGfaceted.cc.

References faces, VUSolid::fgTolerance, UUtils::kInfinity, and numFace.

Referenced by SafetyFromInsideNoVoxels(), and SafetyFromOutside().

+ Here is the caller graph for this function:

double UVCSGfaceted::DistanceToIn ( const UVector3 p,
const UVector3 v,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Reimplemented in UPolyhedra, and UGenericPolycone.

Definition at line 671 of file UVCSGfaceted.cc.

References UVCSGface::Distance(), UBox::DistanceToIn(), DistanceToInNoVoxels(), faces, fBox, fBoxShift, fCandidates, VUSolid::fgTolerance, fMaxSection, fNoVoxels, fZs, GetSection(), UUtils::kInfinity, numFace, UVCSGface::Safety(), UBits::SetBitNumber(), UVector3::x(), UVector3::y(), z, and UVector3::z().

Referenced by UGenericPolycone::DistanceToIn(), and UPolyhedra::DistanceToIn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UVCSGfaceted::DistanceToInNoVoxels ( const UVector3 p,
const UVector3 v 
) const

Definition at line 272 of file UVCSGfaceted.cc.

References faces, VUSolid::fgTolerance, UUtils::kInfinity, numFace, and UVCSGface::Safety().

Referenced by DistanceToIn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UVCSGfaceted::DistanceToOut ( const UVector3 p,
const UVector3 v,
UVector3 n,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
virtual

Implements VUSolid.

Definition at line 756 of file UVCSGfaceted.cc.

References UVCSGface::Distance(), DistanceToOutNoVoxels(), VUSolid::eSurface, faces, fCandidates, VUSolid::fgTolerance, fMaxSection, fNoVoxels, fZs, GetSection(), Inside(), UUtils::kInfinity, CLHEP::normal(), numFace, UVCSGface::Safety(), UBits::SetBitNumber(), and UVector3::z().

+ Here is the call graph for this function:

double UVCSGfaceted::DistanceToOutNoVoxels ( const UVector3 p,
const UVector3 v,
UVector3 n,
bool &  aConvex 
) const

Definition at line 325 of file UVCSGfaceted.cc.

References VUSolid::eSurface, faces, VUSolid::fgTolerance, Inside(), UUtils::kInfinity, CLHEP::normal(), numFace, and UVCSGface::Safety().

Referenced by DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UVCSGfaceted::FindCandidates ( double  z,
std::vector< int > &  candidates,
bool  sides = false 
)
protected

Definition at line 654 of file UVCSGfaceted.cc.

References UVCSGface::Extent(), faces, VUSolid::fgTolerance, and numFace.

Referenced by InitVoxels().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UVCSGfaceted::GetAreaAccuracy ( ) const

Definition at line 491 of file UVCSGfaceted.cc.

References fAreaAccuracy.

int UVCSGfaceted::GetAreaStatistics ( ) const

Definition at line 482 of file UVCSGfaceted.cc.

References fStatistics.

double UVCSGfaceted::GetCubVolEpsilon ( ) const

Definition at line 453 of file UVCSGfaceted.cc.

References fCubVolEpsilon.

int UVCSGfaceted::GetCubVolStatistics ( ) const

Definition at line 444 of file UVCSGfaceted.cc.

References fStatistics.

UGeometryType UVCSGfaceted::GetEntityType ( ) const
virtual

Implements VUSolid.

Reimplemented in UPolyhedra, and UGenericPolycone.

Definition at line 418 of file UVCSGfaceted.cc.

UVector3 UVCSGfaceted::GetPointOnSurfaceGeneric ( ) const
protected

Definition at line 554 of file UVCSGfaceted.cc.

References faces, numFace, UUtils::Random(), and UVCSGface::SurfaceArea().

Referenced by UGenericPolycone::GetPointOnSurface(), and UPolyhedra::GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int UVCSGfaceted::GetSection ( double  z) const
inlineprotected

Definition at line 104 of file UVCSGfaceted.hh.

References UVoxelizer::BinarySearch(), fMaxSection, and fZs.

Referenced by DistanceToIn(), DistanceToOut(), Inside(), and Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UVCSGfaceted::InitVoxels ( UReduciblePolygon z,
double  radius 
)
protected

Definition at line 616 of file UVCSGfaceted.cc.

References UReduciblePolygon::CopyVertices(), fBox, fBoxShift, fCandidates, FindCandidates(), fMaxSection, fZs, UBox::GetZHalfLength(), left, UReduciblePolygon::NumVertices(), right, UBox::Set(), and z.

Referenced by UGenericPolycone::Create(), and UPolyhedra::Create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UVCSGfaceted::Inside ( const UVector3 p) const
virtual

Implements VUSolid.

Reimplemented in UPolyhedra, and UGenericPolycone.

Definition at line 847 of file UVCSGfaceted.cc.

References VUSolid::eOutside, VUSolid::eSurface, faces, fCandidates, VUSolid::fgTolerance, fMaxSection, fNoVoxels, fZs, GetSection(), UVCSGface::Inside(), InsideNoVoxels(), UUtils::kInfinity, numFace, UBits::SetBitNumber(), and UVector3::z().

Referenced by DistanceToOut(), DistanceToOutNoVoxels(), UGenericPolycone::Inside(), and UPolyhedra::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UVCSGfaceted::InsideNoVoxels ( const UVector3 p) const

Definition at line 179 of file UVCSGfaceted.cc.

References VUSolid::eOutside, VUSolid::eSurface, faces, VUSolid::fgTolerance, UUtils::kInfinity, and numFace.

Referenced by Inside().

+ Here is the caller graph for this function:

bool UVCSGfaceted::Normal ( const UVector3 p,
UVector3 n 
) const
virtual

Implements VUSolid.

Definition at line 209 of file UVCSGfaceted.cc.

References faces, fCandidates, VUSolid::fgTolerance, GetSection(), UUtils::kInfinity, UVCSGface::Normal(), CLHEP::normal(), numFace, UBits::SetBitNumber(), and UVector3::z().

+ Here is the call graph for this function:

UVCSGfaceted & UVCSGfaceted::operator= ( const UVCSGfaceted source)

Definition at line 63 of file UVCSGfaceted.cc.

References CopyStuff(), fAreaAccuracy, fCubVolEpsilon, and fStatistics.

Referenced by UGenericPolycone::operator=(), and UPolyhedra::operator=().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 922 of file UVCSGfaceted.cc.

References UVoxelizer::BinarySearch(), VUSolid::fgTolerance, fMaxSection, fNoVoxels, fZs, UUtils::kInfinity, minSafety, numFace, SafetyFromInsideNoVoxels(), SafetyFromInsideSection(), and UVector3::z().

+ Here is the call graph for this function:

double UVCSGfaceted::SafetyFromInsideNoVoxels ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Definition at line 610 of file UVCSGfaceted.cc.

References DistanceTo().

Referenced by SafetyFromInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UVCSGfaceted::SafetyFromInsideSection ( int  index,
const UVector3 p,
UBits bits 
) const
protected

Definition at line 901 of file UVCSGfaceted.cc.

References faces, fCandidates, UUtils::kInfinity, UVCSGface::Safety(), and UBits::SetBitNumber().

Referenced by SafetyFromInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UVCSGfaceted::SafetyFromOutside ( const UVector3 aPoint,
bool  aAccurate = false 
) const
virtual

Implements VUSolid.

Reimplemented in UPolyhedra.

Definition at line 600 of file UVCSGfaceted.cc.

References DistanceTo(), fBox, fBoxShift, UBox::SafetyFromOutside(), UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by UPolyhedra::SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UVCSGfaceted::SetAreaAccuracy ( double  ep)

Definition at line 510 of file UVCSGfaceted.cc.

References fAreaAccuracy, and fSurfaceArea.

void UVCSGfaceted::SetAreaStatistics ( int  st)

Definition at line 500 of file UVCSGfaceted.cc.

References fStatistics, and fSurfaceArea.

void UVCSGfaceted::SetCubVolEpsilon ( double  ep)

Definition at line 472 of file UVCSGfaceted.cc.

References fCubicVolume, and fCubVolEpsilon.

void UVCSGfaceted::SetCubVolStatistics ( int  st)

Definition at line 462 of file UVCSGfaceted.cc.

References fCubicVolume, and fStatistics.

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

Implements VUSolid.

Reimplemented in UPolyhedra, and UGenericPolycone.

Definition at line 427 of file UVCSGfaceted.cc.

References VUSolid::GetName(), and numFace.

+ Here is the call graph for this function:

double UVCSGfaceted::SurfaceArea ( )
virtual

Implements VUSolid.

Definition at line 537 of file UVCSGfaceted.cc.

References VUSolid::EstimateSurfaceArea(), fAreaAccuracy, fStatistics, and fSurfaceArea.

+ Here is the call graph for this function:

Member Data Documentation

double UVCSGfaceted::fAreaAccuracy
private
UBox UVCSGfaceted::fBox
mutableprotected

Definition at line 121 of file UVCSGfaceted.hh.

Referenced by CopyStuff(), DistanceToIn(), InitVoxels(), and SafetyFromOutside().

double UVCSGfaceted::fBoxShift
protected

Definition at line 122 of file UVCSGfaceted.hh.

Referenced by CopyStuff(), DistanceToIn(), InitVoxels(), and SafetyFromOutside().

std::vector<std::vector<int> > UVCSGfaceted::fCandidates
protected
double UVCSGfaceted::fCubicVolume
protected

Definition at line 114 of file UVCSGfaceted.hh.

Referenced by Capacity(), CopyStuff(), SetCubVolEpsilon(), and SetCubVolStatistics().

double UVCSGfaceted::fCubVolEpsilon
private
int UVCSGfaceted::fMaxSection
protected
bool UVCSGfaceted::fNoVoxels
protected
int UVCSGfaceted::fStatistics
private
double UVCSGfaceted::fSurfaceArea
protected

Definition at line 115 of file UVCSGfaceted.hh.

Referenced by CopyStuff(), SetAreaAccuracy(), SetAreaStatistics(), and SurfaceArea().

std::vector<double> UVCSGfaceted::fZs
protected

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