Geant4  10.01.p03
UTessellatedSolid Class Reference

#include <UTessellatedSolid.hh>

+ Inheritance diagram for UTessellatedSolid:
+ Collaboration diagram for UTessellatedSolid:

Public Member Functions

 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 VUSolid::EnumInside Inside (const UVector3 &p) const
 
virtual bool Normal (const UVector3 &p, UVector3 &aNormal) const
 
virtual double SafetyFromOutside (const UVector3 &p, bool aAccurate=false) const
 
virtual double SafetyFromInside (const UVector3 &p, bool aAccurate=false) const
 
virtual UGeometryType GetEntityType () const
 
void SetSolidClosed (const bool t)
 
bool GetSolidClosed () const
 
virtual UVector3 GetPointOnSurface () const
 
virtual std::ostream & StreamInfo (std::ostream &os) const
 
virtual double Capacity ()
 
virtual double SurfaceArea ()
 
virtual void GetParametersList (int, double *) const
 
virtual void ComputeBBox (UBBox *, bool)
 
void SetMaxVoxels (int max)
 
UVoxelizerGetVoxels ()
 
virtual VUSolidClone () const
 
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
 
virtual double DistanceToOut (const UVector3 &p, const UVector3 &v, UVector3 &aNormalVector, bool &aConvex, 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

double DistanceToOutNoVoxels (const UVector3 &p, const UVector3 &v, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
double DistanceToInCandidates (const std::vector< int > &candidates, const UVector3 &aPoint, const UVector3 &aDirection) const
 
void DistanceToOutCandidates (const std::vector< int > &candidates, const UVector3 &aPoint, const UVector3 &direction, double &minDist, UVector3 &minNormal, int &minCandidate) const
 
double DistanceToInNoVoxels (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
void SetExtremeFacets ()
 
VUSolid::EnumInside InsideNoVoxels (const UVector3 &p) const
 
VUSolid::EnumInside InsideVoxels (const UVector3 &aPoint) const
 
void Voxelize ()
 
void CreateVertexList ()
 
void PrecalculateInsides ()
 
void SetRandomVectors ()
 
double DistanceToInCore (const UVector3 &p, const UVector3 &v, double aPstep=UUtils::kInfinity) const
 
double DistanceToOutCore (const UVector3 &p, const UVector3 &v, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
int SetAllUsingStack (const std::vector< int > &voxel, const std::vector< int > &max, bool status, UBits &checked)
 
void DeleteObjects ()
 
void CopyObjects (const UTessellatedSolid &s)
 
double MinDistanceFacet (const UVector3 &p, bool simple, VUFacet *&facet) const
 
bool OutsideOfExtent (const UVector3 &p, double tolerance=0) const
 
void Initialize ()
 TODO: make a benchmark for automatic selection of number of voxels. random voxels will be selected, than for them methods distancetoin/out and inside will be launched. eventually, find out from Geant4 how it is done. More...
 

Static Private Member Functions

static bool CompareSortedVoxel (const std::pair< int, double > &l, const std::pair< int, double > &r)
 

Private Attributes

std::vector< VUFacet * > fFacets
 
std::set< VUFacet * > fExtremeFacets
 
UGeometryType fGeometryType
 
double fCubicVolume
 
double fSurfaceArea
 
std::vector< UVector3fVertexList
 
std::set< UVertexInfo,
UVertexComparator
fFacetList
 
UVector3 fMinExtent
 
UVector3 fMaxExtent
 
bool fSolidClosed
 
std::vector< UVector3fRandir
 
double fgToleranceHalf
 
int fMaxTries
 
UVoxelizer fVoxels
 
UBits fInsides
 

Static Private Attributes

static const double dirTolerance = 1.0E-14
 

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 100 of file UTessellatedSolid.hh.

Constructor & Destructor Documentation

UTessellatedSolid::UTessellatedSolid ( )

Definition at line 54 of file UTessellatedSolid.cc.

References Initialize().

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UTessellatedSolid::~UTessellatedSolid ( )
virtual

Definition at line 81 of file UTessellatedSolid.cc.

References DeleteObjects().

+ Here is the call graph for this function:

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

Definition at line 64 of file UTessellatedSolid.cc.

References Initialize().

+ Here is the call graph for this function:

UTessellatedSolid::UTessellatedSolid ( __void__ &  )

Definition at line 75 of file UTessellatedSolid.cc.

References Initialize().

+ Here is the call graph for this function:

UTessellatedSolid::UTessellatedSolid ( const UTessellatedSolid s)

Definition at line 90 of file UTessellatedSolid.cc.

References CopyObjects(), and Initialize().

+ Here is the call graph for this function:

Member Function Documentation

bool UTessellatedSolid::AddFacet ( VUFacet aFacet)

Definition at line 154 of file UTessellatedSolid.cc.

References UUtils::Exception(), fFacetList, fFacets, VUSolid::fgTolerance, fSolidClosed, VUFacet::GetCircumcentre(), UVertexInfo::id, VUFacet::IsDefined(), UVertexInfo::mag2, UVector3::Mag2(), OutsideOfExtent(), pos, VUFacet::StreamInfo(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by UExtrudedSolid::AddGeneralPolygonFacets(), CopyObjects(), UGenericTrap::CreateTessellatedSolid(), and UExtrudedSolid::MakeFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int UTessellatedSolid::AllocatedMemory ( )

Definition at line 1684 of file UTessellatedSolid.cc.

References UVoxelizer::AllocatedMemory(), AllocatedMemoryWithoutVoxels(), fInsides, fVoxels, and UBits::GetNbytes().

Referenced by DisplayAllocatedMemory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int UTessellatedSolid::AllocatedMemoryWithoutVoxels ( )

Definition at line 1658 of file UTessellatedSolid.cc.

References VUFacet::AllocatedMemory(), fExtremeFacets, fFacets, fRandir, and fVertexList.

Referenced by AllocatedMemory(), and DisplayAllocatedMemory().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual double UTessellatedSolid::Capacity ( )
inlinevirtual

Implements VUSolid.

Definition at line 141 of file UTessellatedSolid.hh.

VUSolid * UTessellatedSolid::Clone ( ) const
virtual

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 1538 of file UTessellatedSolid.cc.

References UTessellatedSolid().

+ Here is the call graph for this function:

bool UTessellatedSolid::CompareSortedVoxel ( const std::pair< int, double > &  l,
const std::pair< int, double > &  r 
)
staticprivate

Definition at line 1335 of file UTessellatedSolid.cc.

Referenced by MinDistanceFacet().

+ Here is the caller graph for this function:

virtual void UTessellatedSolid::ComputeBBox ( UBBox ,
bool   
)
inlinevirtual

Implements VUSolid.

Definition at line 145 of file UTessellatedSolid.hh.

void UTessellatedSolid::CopyObjects ( const UTessellatedSolid s)
private

Definition at line 130 of file UTessellatedSolid.cc.

References AddFacet(), fVoxels, GetFacet(), UVoxelizer::GetMaxVoxels(), GetNumberOfFacets(), GetSolidClosed(), n, UVoxelizer::SetMaxVoxels(), and SetSolidClosed().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::CreateVertexList ( )
private

Definition at line 365 of file UTessellatedSolid.cc.

References fFacets, VUSolid::fgTolerance, fMaxExtent, fMinExtent, fVertexList, VUFacet::GetNumberOfVertices(), VUFacet::GetVertex(), UVertexInfo::id, UVector3::Mag(), UVertexInfo::mag2, G4INCL::Math::max(), OutsideOfExtent(), pos, VUFacet::SetVertexIndex(), VUFacet::SetVertices(), UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by SetSolidClosed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::DeleteObjects ( )
private

Definition at line 120 of file UTessellatedSolid.cc.

References fFacets.

Referenced by operator=(), and ~UTessellatedSolid().

+ Here is the caller graph for this function:

void UTessellatedSolid::DisplayAllocatedMemory ( )

Definition at line 493 of file UTessellatedSolid.cc.

References AllocatedMemory(), and AllocatedMemoryWithoutVoxels().

Referenced by SetSolidClosed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 160 of file UTessellatedSolid.hh.

References DistanceToInCore().

Referenced by UGenericTrap::DistanceToIn(), DistanceToOutNoVoxels(), SafetyFromInside(), and UGenericTrap::SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::DistanceToInCandidates ( const std::vector< int > &  candidates,
const UVector3 aPoint,
const UVector3 aDirection 
) const
private

Definition at line 1241 of file UTessellatedSolid.cc.

References fFacets, fgToleranceHalf, VUFacet::Intersect(), UUtils::kInfinity, and CLHEP::normal().

Referenced by DistanceToInCore().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::DistanceToInCore ( const UVector3 p,
const UVector3 v,
double  aPstep = UUtils::kInfinity 
) const
private

Definition at line 1284 of file UTessellatedSolid.cc.

References UVoxelizer::DistanceToFirst(), DistanceToInCandidates(), DistanceToInNoVoxels(), UVoxelizer::DistanceToNext(), fVoxels, UVoxelizer::GetCandidates(), UVoxelizer::GetCountOfVoxels(), UVoxelizer::GetVoxel(), Inside(), UUtils::kInfinity, VUSolid::Tolerance(), and UVector3::Unit().

Referenced by DistanceToIn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::DistanceToInNoVoxels ( const UVector3 p,
const UVector3 v,
double  aPstep = UUtils::kInfinity 
) const
private

Definition at line 1023 of file UTessellatedSolid.cc.

References DistanceToOut(), UUtils::Exception(), fFacets, fgToleranceHalf, Inside(), VUFacet::Intersect(), UUtils::kInfinity, kInside, mm, CLHEP::normal(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by DistanceToInCore().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual double UTessellatedSolid::DistanceToOut ( const UVector3 p,
const UVector3 v,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
inlinevirtual

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 166 of file UTessellatedSolid.hh.

References DistanceToOutCore().

Referenced by DistanceToInNoVoxels(), UExtrudedSolid::DistanceToOut(), UGenericTrap::SafetyFromInside(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::DistanceToOutCandidates ( const std::vector< int > &  candidates,
const UVector3 aPoint,
const UVector3 direction,
double &  minDist,
UVector3 minNormal,
int &  minCandidate 
) const
private

Definition at line 1149 of file UTessellatedSolid.cc.

References VUFacet::Distance(), fFacets, VUSolid::fgTolerance, fgToleranceHalf, VUFacet::Intersect(), and CLHEP::normal().

Referenced by DistanceToOutCore().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::DistanceToOutCore ( const UVector3 p,
const UVector3 v,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
private

Definition at line 1185 of file UTessellatedSolid.cc.

References UVoxelizer::Contains(), UVoxelizer::DistanceToNext(), DistanceToOutCandidates(), DistanceToOutNoVoxels(), fExtremeFacets, fFacets, fVoxels, UVoxelizer::GetCandidates(), UVoxelizer::GetCountOfVoxels(), UVoxelizer::GetVoxel(), UUtils::kInfinity, Normal(), and UVector3::Unit().

Referenced by DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::DistanceToOutNoVoxels ( const UVector3 p,
const UVector3 v,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const
private

Definition at line 1079 of file UTessellatedSolid.cc.

References VUFacet::Distance(), DistanceToIn(), UUtils::Exception(), fExtremeFacets, fFacets, VUSolid::fgTolerance, fgToleranceHalf, Inside(), VUFacet::Intersect(), UUtils::kInfinity, kOutside, mm, CLHEP::normal(), Normal(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by DistanceToOutCore().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::Extent ( UVector3 aMin,
UVector3 aMax 
) const
virtual

Implements VUSolid.

Definition at line 1545 of file UTessellatedSolid.cc.

References fMaxExtent, and fMinExtent.

UGeometryType UTessellatedSolid::GetEntityType ( ) const
virtual

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 1509 of file UTessellatedSolid.cc.

References fGeometryType.

VUFacet* UTessellatedSolid::GetFacet ( int  i) const
inline

Definition at line 119 of file UTessellatedSolid.hh.

References fFacets.

Referenced by CopyObjects().

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMaxXExtent ( ) const

Definition at line 1560 of file UTessellatedSolid.cc.

References fMaxExtent, and UVector3::x().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMaxYExtent ( ) const

Definition at line 1574 of file UTessellatedSolid.cc.

References fMaxExtent, and UVector3::y().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMaxZExtent ( ) const

Definition at line 1588 of file UTessellatedSolid.cc.

References fMaxExtent, and UVector3::z().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMinXExtent ( ) const

Definition at line 1553 of file UTessellatedSolid.cc.

References fMinExtent, and UVector3::x().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMinYExtent ( ) const

Definition at line 1567 of file UTessellatedSolid.cc.

References fMinExtent, and UVector3::y().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::GetMinZExtent ( ) const

Definition at line 1581 of file UTessellatedSolid.cc.

References fMinExtent, and UVector3::z().

Referenced by UExtrudedSolid::Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int UTessellatedSolid::GetNumberOfFacets ( ) const

Definition at line 556 of file UTessellatedSolid.cc.

References fFacets.

Referenced by CopyObjects().

+ Here is the caller graph for this function:

virtual void UTessellatedSolid::GetParametersList ( int  ,
double *   
) const
inlinevirtual

Implements VUSolid.

Definition at line 144 of file UTessellatedSolid.hh.

UVector3 UTessellatedSolid::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 1610 of file UTessellatedSolid.cc.

References fFacets, and UUtils::Random().

+ Here is the call graph for this function:

bool UTessellatedSolid::GetSolidClosed ( ) const

Definition at line 527 of file UTessellatedSolid.cc.

References fSolidClosed.

Referenced by CopyObjects().

+ Here is the caller graph for this function:

double UTessellatedSolid::GetSurfaceArea ( )
virtual

Definition at line 1595 of file UTessellatedSolid.cc.

References fFacets, fSurfaceArea, and VUFacet::GetArea().

Referenced by SurfaceArea().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UVoxelizer& UTessellatedSolid::GetVoxels ( )
inline

Definition at line 149 of file UTessellatedSolid.hh.

References fVoxels.

void UTessellatedSolid::Initialize ( )
private

TODO: make a benchmark for automatic selection of number of voxels. random voxels will be selected, than for them methods distancetoin/out and inside will be launched. eventually, find out from Geant4 how it is done.

Definition at line 36 of file UTessellatedSolid.cc.

References UUtils::kInfinity.

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

+ Here is the caller graph for this function:

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

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 773 of file UTessellatedSolid.cc.

References fVoxels, UVoxelizer::GetCountOfVoxels(), InsideNoVoxels(), and InsideVoxels().

Referenced by DistanceToInCore(), DistanceToInNoVoxels(), DistanceToOutNoVoxels(), UGenericTrap::Inside(), SafetyFromInside(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UTessellatedSolid::InsideNoVoxels ( const UVector3 p) const
private

Definition at line 794 of file UTessellatedSolid.cc.

References dirTolerance, VUFacet::Distance(), UVector3::Dot(), VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, UUtils::Exception(), fFacets, fGeometryType, VUSolid::fgTolerance, fgToleranceHalf, fMaxTries, fRandir, VUSolid::GetName(), UUtils::kInfinity, mm, OutsideOfExtent(), G4InuclParticleNames::sm, UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by Inside(), and PrecalculateInsides().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UTessellatedSolid::InsideVoxels ( const UVector3 aPoint) const
private

Definition at line 563 of file UTessellatedSolid.cc.

References dirTolerance, VUFacet::Distance(), UVoxelizer::DistanceToNext(), UVector3::Dot(), VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, UUtils::Exception(), fFacets, fGeometryType, VUSolid::fgTolerance, fgToleranceHalf, fInsides, fMaxTries, fRandir, fVoxels, UVoxelizer::GetCandidates(), VUSolid::GetName(), UBits::GetNbits(), UVoxelizer::GetVoxel(), UVoxelizer::GetVoxelsIndex(), VUFacet::Intersect(), UUtils::kInfinity, mm, OutsideOfExtent(), G4InuclParticleNames::sm, UVector3::Unit(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::MinDistanceFacet ( const UVector3 p,
bool  simple,
VUFacet *&  facet 
) const
private

Definition at line 1348 of file UTessellatedSolid.cc.

References CompareSortedVoxel(), VUFacet::Distance(), fFacets, fVoxels, UVoxelizer::GetVoxelBox(), UVoxelizer::GetVoxelBoxCandidates(), UVoxelizer::GetVoxelBoxesSize(), UVoxelBox::hlen, UUtils::kInfinity, UVoxelizer::MinDistanceToBox(), and UVoxelBox::pos.

Referenced by Normal(), SafetyFromInside(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UTessellatedSolid::Normal ( const UVector3 p,
UVector3 aNormal 
) const
virtual

Implements VUSolid.

Definition at line 946 of file UTessellatedSolid.cc.

References VUFacet::Distance(), UUtils::Exception(), fFacets, fgToleranceHalf, fVoxels, UVoxelizer::GetCandidates(), UVoxelizer::GetCountOfVoxels(), VUFacet::GetSurfaceNormal(), UVoxelizer::GetVoxel(), UUtils::kInfinity, MinDistanceFacet(), UWarning, and UVector3::z().

Referenced by DistanceToOutCore(), and DistanceToOutNoVoxels().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UTessellatedSolid & UTessellatedSolid::operator+= ( const UTessellatedSolid right)

Definition at line 542 of file UTessellatedSolid.cc.

References right.

UTessellatedSolid & UTessellatedSolid::operator= ( const UTessellatedSolid s)

Definition at line 102 of file UTessellatedSolid.cc.

References CopyObjects(), DeleteObjects(), and Initialize().

Referenced by UExtrudedSolid::operator=().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UTessellatedSolid::OutsideOfExtent ( const UVector3 p,
double  tolerance = 0 
) const
inlineprivate

Definition at line 229 of file UTessellatedSolid.hh.

References fMaxExtent, fMinExtent, tolerance, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by AddFacet(), CreateVertexList(), InsideNoVoxels(), InsideVoxels(), SafetyFromInside(), and SafetyFromOutside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::PrecalculateInsides ( )
private

Definition at line 279 of file UTessellatedSolid.cc.

References UBits::Clear(), VUSolid::eInside, fInsides, fVoxels, UVoxelizer::GetBoundary(), UVoxelizer::GetVoxelsIndex(), InsideNoVoxels(), UVoxelizer::IsEmpty(), UBits::ResetBitNumber(), SetAllUsingStack(), and UBits::SetBitNumber().

Referenced by Voxelize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::SafetyFromInside ( const UVector3 p,
bool  aAccurate = false 
) const
virtual

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 1459 of file UTessellatedSolid.cc.

References VUFacet::Distance(), DistanceToIn(), UUtils::Exception(), fFacets, VUSolid::fgTolerance, fVoxels, UVoxelizer::GetCountOfVoxels(), Inside(), UUtils::kInfinity, kOutside, MinDistanceFacet(), mm, OutsideOfExtent(), UWarning, UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by UExtrudedSolid::SafetyFromInside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UTessellatedSolid::SafetyFromOutside ( const UVector3 p,
bool  aAccurate = false 
) const
virtual
int UTessellatedSolid::SetAllUsingStack ( const std::vector< int > &  voxel,
const std::vector< int > &  max,
bool  status,
UBits checked 
)
private

Definition at line 225 of file UTessellatedSolid.cc.

References fInsides, fVoxels, UVoxelizer::GetVoxelsIndex(), UVoxelizer::IsEmpty(), pos, and UBits::SetBitNumber().

Referenced by PrecalculateInsides().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::SetExtremeFacets ( )
private

Definition at line 330 of file UTessellatedSolid.cc.

References fExtremeFacets, fFacets, fVertexList, and VUFacet::IsInside().

Referenced by SetSolidClosed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UTessellatedSolid::SetMaxVoxels ( int  max)
inline

Definition at line 147 of file UTessellatedSolid.hh.

References fVoxels, and UVoxelizer::SetMaxVoxels().

+ Here is the call graph for this function:

void UTessellatedSolid::SetRandomVectors ( )
private

Definition at line 1627 of file UTessellatedSolid.cc.

References fMaxTries, and fRandir.

void UTessellatedSolid::SetSolidClosed ( const bool  t)

Definition at line 503 of file UTessellatedSolid.cc.

References CreateVertexList(), DisplayAllocatedMemory(), fSolidClosed, SetExtremeFacets(), and Voxelize().

Referenced by CopyObjects(), UGenericTrap::CreateTessellatedSolid(), and UExtrudedSolid::MakeFacets().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Reimplemented in UExtrudedSolid.

Definition at line 1516 of file UTessellatedSolid.cc.

References fFacets, fGeometryType, and VUFacet::StreamInfo().

+ Here is the call graph for this function:

virtual double UTessellatedSolid::SurfaceArea ( )
inlinevirtual

Implements VUSolid.

Definition at line 142 of file UTessellatedSolid.hh.

References GetSurfaceArea().

+ Here is the call graph for this function:

void UTessellatedSolid::Voxelize ( )
private

Definition at line 311 of file UTessellatedSolid.cc.

References UVoxelizer::BuildBoundingBox(), UVoxelizer::Empty(), fFacets, VUSolid::fgTolerance, fMaxExtent, fMinExtent, fVoxels, UBits::GetNbits(), PrecalculateInsides(), and UVoxelizer::Voxelize().

Referenced by SetSolidClosed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double const UTessellatedSolid::dirTolerance = 1.0E-14
staticprivate

Definition at line 254 of file UTessellatedSolid.hh.

Referenced by InsideNoVoxels(), and InsideVoxels().

double UTessellatedSolid::fCubicVolume
private

Definition at line 244 of file UTessellatedSolid.hh.

std::set<VUFacet*> UTessellatedSolid::fExtremeFacets
private
std::set<UVertexInfo, UVertexComparator> UTessellatedSolid::fFacetList
private

Definition at line 249 of file UTessellatedSolid.hh.

Referenced by AddFacet().

UGeometryType UTessellatedSolid::fGeometryType
private

Definition at line 243 of file UTessellatedSolid.hh.

Referenced by GetEntityType(), InsideNoVoxels(), InsideVoxels(), and StreamInfo().

double UTessellatedSolid::fgToleranceHalf
private
UBits UTessellatedSolid::fInsides
private
UVector3 UTessellatedSolid::fMaxExtent
private
int UTessellatedSolid::fMaxTries
private

Definition at line 259 of file UTessellatedSolid.hh.

Referenced by InsideNoVoxels(), InsideVoxels(), and SetRandomVectors().

UVector3 UTessellatedSolid::fMinExtent
private
std::vector<UVector3> UTessellatedSolid::fRandir
private
bool UTessellatedSolid::fSolidClosed
private

Definition at line 252 of file UTessellatedSolid.hh.

Referenced by AddFacet(), GetSolidClosed(), and SetSolidClosed().

double UTessellatedSolid::fSurfaceArea
private

Definition at line 245 of file UTessellatedSolid.hh.

Referenced by GetSurfaceArea().

std::vector<UVector3> UTessellatedSolid::fVertexList
private

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