Geant4  10.01.p03
UMultiUnion Class Reference

#include <UMultiUnion.hh>

+ Inheritance diagram for UMultiUnion:
+ Collaboration diagram for UMultiUnion:

Public Member Functions

 UMultiUnion ()
 
 UMultiUnion (const std::string &name)
 
 ~UMultiUnion ()
 
void AddNode (VUSolid &solid, UTransform3D &trans)
 
 UMultiUnion (const UMultiUnion &rhs)
 
UMultiUnionoperator= (const UMultiUnion &rhs)
 
const UTransform3DGetTransformation (int index) const
 
VUSolidGetSolid (int index) const
 
int GetNumberOfSolids () const
 
EnumInside Inside (const UVector3 &aPoint) const
 
EnumInside InsideIterator (const UVector3 &aPoint) const
 
double SafetyFromInside (const UVector3 &aPoint, bool aAccurate=false) const
 
double SafetyFromOutside (const UVector3 &aPoint, bool aAccurate=false) const
 
double DistanceToInNoVoxels (const UVector3 &aPoint, const UVector3 &aDirection, double aPstep=UUtils::kInfinity) const
 
double DistanceToIn (const UVector3 &aPoint, const UVector3 &aDirection, double aPstep) const
 
double DistanceToOut (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
double DistanceToOutVoxels (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
double DistanceToOutVoxelsCore (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, std::vector< int > &candidates) const
 
double DistanceToOutNoVoxels (const UVector3 &aPoint, const UVector3 &aDirection, UVector3 &aNormalVector, bool &aConvex, double aPstep=UUtils::kInfinity) const
 
bool Normal (const UVector3 &aPoint, UVector3 &aNormal) const
 
void Extent (EAxisType aAxis, double &aMin, double &aMax) const
 
void Extent (UVector3 &aMin, UVector3 &aMax) const
 
double Capacity ()
 
double SurfaceArea ()
 
VUSolidClone () const
 
UGeometryType GetEntityType () const
 
void ComputeBBox (UBBox *aBox, bool aStore=false)
 
virtual void GetParametersList (int, double *) const
 
void Voxelize ()
 
EnumInside InsideNoVoxels (const UVector3 &aPoint) const
 
UVoxelizerGetVoxels () const
 
std::ostream & StreamInfo (std::ostream &os) const
 
UVector3 GetPointOnSurface () const
 
- 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 SetVoxelFinder (const UVoxelizer &finder)
 
EnumInside InsideWithExclusion (const UVector3 &aPoint, UBits *bits=NULL) const
 
int SafetyFromOutsideNumberNode (const UVector3 &aPoint, bool aAccurate, double &safety) const
 
double DistanceToInCandidates (const UVector3 &aPoint, const UVector3 &aDirection, double aPstep, std::vector< int > &candidates, UBits &bits) const
 

Private Attributes

std::vector< VUSolid * > fSolids
 
std::vector< UTransform3DfTransformObjs
 
UVoxelizer fVoxels
 
double fCubicVolume
 
double fSurfaceArea
 

Friends

class UVoxelizer
 

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 34 of file UMultiUnion.hh.

Constructor & Destructor Documentation

UMultiUnion::UMultiUnion ( )
inline

Definition at line 39 of file UMultiUnion.hh.

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

Definition at line 29 of file UMultiUnion.cc.

UMultiUnion::~UMultiUnion ( )

Definition at line 39 of file UMultiUnion.cc.

UMultiUnion::UMultiUnion ( const UMultiUnion rhs)

Definition at line 58 of file UMultiUnion.cc.

Member Function Documentation

void UMultiUnion::AddNode ( VUSolid solid,
UTransform3D trans 
)

Definition at line 44 of file UMultiUnion.cc.

Referenced by G4UMultiUnion::AddNode().

+ Here is the caller graph for this function:

double UMultiUnion::Capacity ( )
virtual

Implements VUSolid.

Definition at line 84 of file UMultiUnion.cc.

References VUSolid::eOutside, Extent(), fCubicVolume, Inside(), left, and UVector3::MultiplyByComponents().

+ Here is the call graph for this function:

VUSolid * UMultiUnion::Clone ( ) const
virtual

Implements VUSolid.

Definition at line 51 of file UMultiUnion.cc.

void UMultiUnion::ComputeBBox ( UBBox aBox,
bool  aStore = false 
)
virtual

Implements VUSolid.

Definition at line 116 of file UMultiUnion.cc.

double UMultiUnion::DistanceToIn ( const UVector3 aPoint,
const UVector3 aDirection,
double  aPstep 
) const
virtual

Implements VUSolid.

Definition at line 178 of file UMultiUnion.cc.

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

+ Here is the call graph for this function:

double UMultiUnion::DistanceToInCandidates ( const UVector3 aPoint,
const UVector3 aDirection,
double  aPstep,
std::vector< int > &  candidates,
UBits bits 
) const
private

Definition at line 146 of file UMultiUnion.cc.

References VUSolid::DistanceToIn(), fSolids, fTransformObjs, UUtils::kInfinity, UTransform3D::LocalPoint(), UTransform3D::LocalVector(), and UBits::SetBitNumber().

Referenced by DistanceToIn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UMultiUnion::DistanceToInNoVoxels ( const UVector3 aPoint,
const UVector3 aDirection,
double  aPstep = UUtils::kInfinity 
) const

Definition at line 123 of file UMultiUnion.cc.

References VUSolid::DistanceToIn(), fSolids, fTransformObjs, UUtils::kInfinity, UTransform3D::LocalPoint(), UTransform3D::LocalVector(), and UVector3::Unit().

Referenced by DistanceToIn().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 278 of file UMultiUnion.cc.

References DistanceToOutNoVoxels(), DistanceToOutVoxels(), Inside(), and VUSolid::Tolerance().

+ Here is the call graph for this function:

double UMultiUnion::DistanceToOutNoVoxels ( const UVector3 aPoint,
const UVector3 aDirection,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const

Definition at line 228 of file UMultiUnion.cc.

References VUSolid::DistanceToOut(), VUSolid::eOutside, fSolids, fTransformObjs, UTransform3D::GlobalPoint(), VUSolid::Inside(), UUtils::kInfinity, UTransform3D::LocalPoint(), UTransform3D::LocalVector(), and UVector3::Unit().

Referenced by DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UMultiUnion::DistanceToOutVoxels ( const UVector3 aPoint,
const UVector3 aDirection,
UVector3 aNormalVector,
bool &  aConvex,
double  aPstep = UUtils::kInfinity 
) const

Definition at line 303 of file UMultiUnion.cc.

References VUSolid::DistanceToOut(), VUSolid::eOutside, fSolids, fTransformObjs, fVoxels, UVoxelizer::GetBitsPerSlice(), UVoxelizer::GetCandidatesVoxelArray(), UTransform3D::GlobalVector(), VUSolid::Inside(), InsideWithExclusion(), UUtils::kInfinity, UTransform3D::LocalPoint(), UTransform3D::LocalVector(), and UVector3::Unit().

Referenced by DistanceToOut().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double UMultiUnion::DistanceToOutVoxelsCore ( const UVector3 aPoint,
const UVector3 aDirection,
UVector3 aNormalVector,
bool &  aConvex,
std::vector< int > &  candidates 
) const
void UMultiUnion::Extent ( EAxisType  aAxis,
double &  aMin,
double &  aMax 
) const

Definition at line 627 of file UMultiUnion.cc.

References VUSolid::eXaxis, VUSolid::Extent(), VUSolid::eYaxis, VUSolid::eZaxis, fSolids, GetTransformation(), G4INCL::Math::max(), G4INCL::Math::min(), UUtils::TransformLimits(), UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by Capacity(), and Extent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 688 of file UMultiUnion.cc.

References VUSolid::eXaxis, Extent(), VUSolid::eYaxis, and VUSolid::eZaxis.

+ Here is the call graph for this function:

UGeometryType UMultiUnion::GetEntityType ( ) const
inlinevirtual

Implements VUSolid.

Definition at line 107 of file UMultiUnion.hh.

int UMultiUnion::GetNumberOfSolids ( ) const
inline

Definition at line 150 of file UMultiUnion.hh.

References fSolids.

Referenced by G4UMultiUnion::GetNumberOfSolids().

+ Here is the caller graph for this function:

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

Implements VUSolid.

Definition at line 110 of file UMultiUnion.hh.

UVector3 UMultiUnion::GetPointOnSurface ( ) const
virtual

Implements VUSolid.

Definition at line 962 of file UMultiUnion.cc.

References VUSolid::eSurface, fSolids, fTransformObjs, VUSolid::GetPointOnSurface(), UTransform3D::GlobalPoint(), Inside(), and UUtils::Random().

+ Here is the call graph for this function:

VUSolid * UMultiUnion::GetSolid ( int  index) const
inline

Definition at line 146 of file UMultiUnion.hh.

References fSolids.

Referenced by G4UMultiUnion::GetSolid().

+ Here is the caller graph for this function:

const UTransform3D & UMultiUnion::GetTransformation ( int  index) const
inline

Definition at line 142 of file UMultiUnion.hh.

References fTransformObjs.

Referenced by Extent(), G4UMultiUnion::GetTransformation(), and InsideNoVoxels().

+ Here is the caller graph for this function:

UVoxelizer & UMultiUnion::GetVoxels ( ) const
inline

Definition at line 138 of file UMultiUnion.hh.

References fVoxels.

VUSolid::EnumInside UMultiUnion::Inside ( const UVector3 aPoint) const
virtual

Implements VUSolid.

Definition at line 571 of file UMultiUnion.cc.

References InsideNoVoxels(), and InsideWithExclusion().

Referenced by Capacity(), DistanceToIn(), DistanceToOut(), and GetPointOnSurface().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

EnumInside UMultiUnion::InsideIterator ( const UVector3 aPoint) const
VUSolid::EnumInside UMultiUnion::InsideNoVoxels ( const UVector3 aPoint) const

Definition at line 600 of file UMultiUnion.cc.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, fSolids, GetTransformation(), VUSolid::Inside(), and UTransform3D::LocalPoint().

Referenced by Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VUSolid::EnumInside UMultiUnion::InsideWithExclusion ( const UVector3 aPoint,
UBits bits = NULL 
) const
private

Definition at line 434 of file UMultiUnion.cc.

References VUSolid::eInside, VUSolid::eOutside, VUSolid::eSurface, VUSolid::frTolerance, fSolids, fTransformObjs, fVoxels, UVoxelizer::GetCandidatesVoxelArray(), VUSolid::Inside(), left, UTransform3D::LocalPoint(), n, VUSolid::Normal(), USurface::point, right, and USurface::solid.

Referenced by DistanceToOutVoxels(), and Inside().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool UMultiUnion::Normal ( const UVector3 aPoint,
UVector3 aNormal 
) const
virtual

Implements VUSolid.

Definition at line 696 of file UMultiUnion.cc.

References VUSolid::eInside, VUSolid::eSurface, fSolids, fTransformObjs, fVoxels, UVoxelizer::GetCandidatesVoxelArray(), UTransform3D::GlobalVector(), VUSolid::Inside(), UUtils::kInfinity, UTransform3D::LocalPoint(), CLHEP::normal(), VUSolid::Normal(), s, VUSolid::SafetyFromInside(), VUSolid::SafetyFromOutside(), SafetyFromOutsideNumberNode(), and UVector3::Unit().

+ Here is the call graph for this function:

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

Definition at line 67 of file UMultiUnion.cc.

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

Implements VUSolid.

Definition at line 782 of file UMultiUnion.cc.

References VUSolid::eInside, fSolids, fTransformObjs, fVoxels, UVoxelizer::GetCandidatesVoxelArray(), VUSolid::Inside(), UUtils::kInfinity, UTransform3D::LocalPoint(), and VUSolid::SafetyFromInside().

+ Here is the call graph for this function:

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

Implements VUSolid.

Definition at line 817 of file UMultiUnion.cc.

References fSolids, fTransformObjs, fVoxels, UVoxelizer::GetBoxes(), UUtils::kInfinity, UTransform3D::LocalPoint(), pos, VUSolid::SafetyFromOutside(), and UVoxelizer::SafetyToBoundingBox().

+ Here is the call graph for this function:

int UMultiUnion::SafetyFromOutsideNumberNode ( const UVector3 aPoint,
bool  aAccurate,
double &  safety 
) const
private

Definition at line 893 of file UMultiUnion.cc.

References fSolids, fTransformObjs, fVoxels, UVoxelizer::GetBoxes(), UUtils::kInfinity, UTransform3D::LocalPoint(), VUSolid::SafetyFromOutside(), UVector3::x(), UVector3::y(), and UVector3::z().

Referenced by Normal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void UMultiUnion::SetVoxelFinder ( const UVoxelizer finder)
private
std::ostream & UMultiUnion::StreamInfo ( std::ostream &  os) const
virtual

Implements VUSolid.

Definition at line 934 of file UMultiUnion.cc.

References UTransform3D::fRot, fSolids, UTransform3D::fTr, fTransformObjs, VUSolid::GetName(), and VUSolid::StreamInfo().

+ Here is the call graph for this function:

double UMultiUnion::SurfaceArea ( )
virtual

Implements VUSolid.

Definition at line 872 of file UMultiUnion.cc.

References VUSolid::EstimateSurfaceArea(), and fSurfaceArea.

+ Here is the call graph for this function:

void UMultiUnion::Voxelize ( )

Definition at line 887 of file UMultiUnion.cc.

References fSolids, fTransformObjs, fVoxels, and UVoxelizer::Voxelize().

Referenced by G4UMultiUnion::Voxelize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class UVoxelizer
friend

Definition at line 36 of file UMultiUnion.hh.

Member Data Documentation

double UMultiUnion::fCubicVolume
private

Definition at line 134 of file UMultiUnion.hh.

Referenced by Capacity().

double UMultiUnion::fSurfaceArea
private

Definition at line 135 of file UMultiUnion.hh.

Referenced by SurfaceArea().


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