Geant4
10.01.p02
|
#include <G4SurfaceVoxelizer.hh>
Classes | |
class | G4VoxelComparator |
Public Member Functions | |
void | Voxelize (std::vector< G4VFacet * > &facets) |
void | DisplayVoxelLimits () |
void | DisplayBoundaries () |
void | DisplayListNodes () const |
G4SurfaceVoxelizer () | |
~G4SurfaceVoxelizer () | |
void | GetCandidatesVoxel (std::vector< G4int > &voxels) |
G4int | GetCandidatesVoxelArray (const G4ThreeVector &point, std::vector< G4int > &list, G4SurfBits *crossed=0) const |
G4int | GetCandidatesVoxelArray (const std::vector< G4int > &voxels, const G4SurfBits bitmasks[], std::vector< G4int > &list, G4SurfBits *crossed=0) const |
G4int | GetCandidatesVoxelArray (const std::vector< G4int > &voxels, std::vector< G4int > &list, G4SurfBits *crossed=0) const |
const std::vector< G4VoxelBox > & | GetBoxes () const |
const std::vector< G4double > & | GetBoundary (G4int index) const |
G4bool | UpdateCurrentVoxel (const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const |
void | GetVoxel (std::vector< G4int > &curVoxel, const G4ThreeVector &point) const |
G4int | GetBitsPerSlice () const |
G4bool | Contains (const G4ThreeVector &point) const |
G4double | DistanceToNext (const G4ThreeVector &point, const G4ThreeVector &direction, const std::vector< G4int > &curVoxel) const |
G4double | DistanceToFirst (const G4ThreeVector &point, const G4ThreeVector &direction) const |
G4double | DistanceToBoundingBox (const G4ThreeVector &point) const |
G4int | GetVoxelsIndex (G4int x, G4int y, G4int z) const |
G4int | GetVoxelsIndex (const std::vector< G4int > &voxels) const |
G4int | GetPointIndex (const G4ThreeVector &p) const |
const G4SurfBits & | Empty () const |
G4bool | IsEmpty (G4int index) const |
void | SetMaxVoxels (G4int max) |
void | SetMaxVoxels (const G4ThreeVector &reductionRatio) |
G4int | GetMaxVoxels (G4ThreeVector &ratioOfReduction) |
G4int | AllocatedMemory () |
long long | GetCountOfVoxels () const |
long long | CountVoxels (std::vector< G4double > boundaries[]) const |
G4int | GetCandidates (std::vector< G4int > &curVoxel, std::vector< G4int > *&candidates, std::vector< G4int > &space) const |
const std::vector< G4int > & | GetCandidates (std::vector< G4int > &curVoxel) const |
G4int | GetVoxelBoxesSize () const |
const G4VoxelBox & | GetVoxelBox (G4int i) const |
const std::vector< G4int > & | GetVoxelBoxCandidates (G4int i) const |
Static Public Member Functions | |
template<typename T > | |
static G4int | BinarySearch (const std::vector< T > &vec, T value) |
static G4double | MinDistanceToBox (const G4ThreeVector &aPoint, const G4ThreeVector &f) |
static G4int | SetDefaultVoxelsCount (G4int count) |
static G4int | GetDefaultVoxelsCount () |
Private Member Functions | |
void | BuildEmpty () |
G4String | GetCandidatesAsString (const G4SurfBits &bits) const |
void | CreateSortedBoundary (std::vector< G4double > &boundaryRaw, G4int axis) |
void | BuildBoundaries () |
void | BuildReduceVoxels (std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio) |
void | BuildReduceVoxels2 (std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio) |
void | BuildVoxelLimits (std::vector< G4VFacet * > &facets) |
void | DisplayBoundaries (std::vector< G4double > &fBoundaries) |
void | BuildBitmasks (std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[], G4bool countsOnly=false) |
void | BuildBoundingBox () |
void | SetReductionRatio (G4int maxVoxels, G4ThreeVector &reductionRatio) |
void | CreateMiniVoxels (std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[]) |
Static Private Member Functions | |
static void | FindComponentsFastest (unsigned int mask, std::vector< G4int > &list, G4int i) |
Private Attributes | |
std::vector< G4VoxelBox > | fVoxelBoxes |
std::vector< std::vector< G4int > > | fVoxelBoxesCandidates |
std::map< G4int, std::vector < G4int > > | fCandidates |
const std::vector< G4int > | fNoCandidates |
long long | fCountOfVoxels |
G4int | fNPerSlice |
std::vector< G4VoxelBox > | fBoxes |
std::vector< G4double > | fBoundaries [3] |
std::vector< G4int > | fCandidatesCounts [3] |
G4int | fTotalCandidates |
G4SurfBits | fBitmasks [3] |
G4ThreeVector | fBoundingBoxCenter |
G4Box | fBoundingBox |
G4ThreeVector | fBoundingBoxSize |
G4ThreeVector | fReductionRatio |
G4int | fMaxVoxels |
G4double | fTolerance |
G4SurfBits | fEmpty |
Static Private Attributes | |
static G4ThreadLocal G4int | fDefaultVoxelsCount = -1 |
Friends | |
class | G4VoxelCandidatesIterator |
Definition at line 68 of file G4SurfaceVoxelizer.hh.
G4SurfaceVoxelizer::G4SurfaceVoxelizer | ( | ) |
Definition at line 60 of file G4SurfaceVoxelizer.cc.
References G4SolidStore::DeRegister(), fBoundingBox, fCountOfVoxels, fDefaultVoxelsCount, fNPerSlice, fTolerance, fTotalCandidates, G4GeometryTolerance::GetInstance(), G4SolidStore::GetInstance(), G4GeometryTolerance::GetSurfaceTolerance(), and SetMaxVoxels().
G4SurfaceVoxelizer::~G4SurfaceVoxelizer | ( | ) |
Definition at line 73 of file G4SurfaceVoxelizer.cc.
G4int G4SurfaceVoxelizer::AllocatedMemory | ( | ) |
Definition at line 1083 of file G4SurfaceVoxelizer.cc.
References fBitmasks, fBoundaries, fBoxes, fCandidates, fCandidatesCounts, fEmpty, and G4SurfBits::GetNbytes().
Referenced by G4TessellatedSolid::AllocatedMemory().
|
inlinestatic |
Referenced by BuildBitmasks(), GetCandidatesVoxelArray(), and UpdateCurrentVoxel().
|
private |
Definition at line 308 of file G4SurfaceVoxelizer.cc.
References BinarySearch(), G4SurfBits::Clear(), fBoxes, fCandidatesCounts, G4cout, G4endl, GetBitsPerSlice(), G4INCL::Math::max(), G4INCL::Math::min(), G4SurfBits::SetBitNumber(), and G4INCL::CrossSections::total().
Referenced by Voxelize().
|
private |
Definition at line 201 of file G4SurfaceVoxelizer.cc.
References CreateSortedBoundary(), fBoundaries, fBoxes, fTolerance, G4cout, G4endl, G4INCL::Math::max(), n, and tolerance.
Referenced by Voxelize().
|
private |
Definition at line 414 of file G4SurfaceVoxelizer.cc.
References fBoundaries, fBoundingBox, fBoundingBoxCenter, fBoundingBoxSize, fTolerance, G4INCL::Math::max(), and G4INCL::Math::min().
Referenced by Voxelize().
|
private |
Definition at line 78 of file G4SurfaceVoxelizer.cc.
References G4SurfBits::Clear(), fBoundaries, fCandidates, fEmpty, fTotalCandidates, G4cout, G4endl, GetCandidatesVoxelArray(), GetVoxelsIndex(), G4INCL::Math::max(), G4SurfBits::ResetAllBits(), G4SurfBits::ResetBitNumber(), and G4SurfBits::SetBitNumber().
Referenced by Voxelize().
|
private |
Definition at line 461 of file G4SurfaceVoxelizer.cc.
References G4VoxelInfo::count, fCandidatesCounts, G4INCL::Math::max(), G4VoxelInfo::next, pos, and G4VoxelInfo::previous.
Referenced by Voxelize().
|
private |
Definition at line 547 of file G4SurfaceVoxelizer.cc.
References fCandidatesCounts, G4INCL::Math::max(), and G4INCL::CrossSections::total().
Referenced by Voxelize().
|
private |
Definition at line 121 of file G4SurfaceVoxelizer.cc.
References G4VFacet::Extent(), fBoxes, fNPerSlice, fTolerance, fTotalCandidates, G4INCL::Math::max(), G4INCL::Math::min(), and z.
Referenced by Voxelize().
G4bool G4SurfaceVoxelizer::Contains | ( | const G4ThreeVector & | point | ) | const |
Definition at line 926 of file G4SurfaceVoxelizer.cc.
References fBoundaries.
Referenced by G4TessellatedSolid::DistanceToOutCore().
|
inline |
|
private |
Definition at line 590 of file G4SurfaceVoxelizer.cc.
References fVoxelBoxes, fVoxelBoxesCandidates, GetCandidatesVoxelArray(), G4VoxelBox::hlen, and G4VoxelBox::pos.
Referenced by Voxelize().
|
private |
Definition at line 171 of file G4SurfaceVoxelizer.cc.
References fBoxes, G4cout, and G4endl.
Referenced by BuildBoundaries().
void G4SurfaceVoxelizer::DisplayBoundaries | ( | ) |
Definition at line 281 of file G4SurfaceVoxelizer.cc.
References fBoundaries, G4cout, and G4endl.
|
private |
Definition at line 292 of file G4SurfaceVoxelizer.cc.
void G4SurfaceVoxelizer::DisplayListNodes | ( | ) | const |
Definition at line 389 of file G4SurfaceVoxelizer.cc.
References fBitmasks, fBoundaries, fNPerSlice, G4cout, G4endl, GetCandidatesAsString(), and G4SurfBits::set().
void G4SurfaceVoxelizer::DisplayVoxelLimits | ( | ) |
Definition at line 154 of file G4SurfaceVoxelizer.cc.
G4double G4SurfaceVoxelizer::DistanceToBoundingBox | ( | const G4ThreeVector & | point | ) | const |
Definition at line 948 of file G4SurfaceVoxelizer.cc.
References fBoundingBoxCenter, fBoundingBoxSize, and MinDistanceToBox().
Referenced by G4TessellatedSolid::SafetyFromOutside().
G4double G4SurfaceVoxelizer::DistanceToFirst | ( | const G4ThreeVector & | point, |
const G4ThreeVector & | direction | ||
) | const |
Definition at line 938 of file G4SurfaceVoxelizer.cc.
References G4Box::DistanceToIn(), fBoundingBox, and fBoundingBoxCenter.
Referenced by G4TessellatedSolid::DistanceToInCore().
G4double G4SurfaceVoxelizer::DistanceToNext | ( | const G4ThreeVector & | point, |
const G4ThreeVector & | direction, | ||
const std::vector< G4int > & | curVoxel | ||
) | const |
Definition at line 983 of file G4SurfaceVoxelizer.cc.
References fBoundaries, fTolerance, and kInfinity.
Referenced by G4TessellatedSolid::DistanceToInCore(), G4TessellatedSolid::DistanceToOutCore(), and G4TessellatedSolid::InsideVoxels().
|
inline |
|
staticprivate |
Definition at line 773 of file G4SurfaceVoxelizer.cc.
Referenced by GetCandidatesVoxelArray().
|
inline |
Referenced by G4TessellatedSolid::PrecalculateInsides().
|
inline |
|
inline |
Referenced by G4TessellatedSolid::DistanceToInCore(), G4TessellatedSolid::DistanceToOutCore(), G4TessellatedSolid::InsideVoxels(), G4TessellatedSolid::Normal(), and G4TessellatedSolid::SafetyFromOutside().
|
inline |
|
private |
Definition at line 374 of file G4SurfaceVoxelizer.cc.
References fBoxes, and G4SurfBits::TestBitNumber().
Referenced by DisplayListNodes().
void G4SurfaceVoxelizer::GetCandidatesVoxel | ( | std::vector< G4int > & | voxels | ) |
Definition at line 758 of file G4SurfaceVoxelizer.cc.
References G4cout, G4endl, and GetCandidatesVoxelArray().
G4int G4SurfaceVoxelizer::GetCandidatesVoxelArray | ( | const G4ThreeVector & | point, |
std::vector< G4int > & | list, | ||
G4SurfBits * | crossed = 0 |
||
) | const |
Definition at line 792 of file G4SurfaceVoxelizer.cc.
References BinarySearch(), G4SurfBits::fAllBits, fBitmasks, fBoundaries, FindComponentsFastest(), fNPerSlice, fTotalCandidates, and mask.
Referenced by BuildEmpty(), CreateMiniVoxels(), GetCandidatesVoxel(), and GetCandidatesVoxelArray().
G4int G4SurfaceVoxelizer::GetCandidatesVoxelArray | ( | const std::vector< G4int > & | voxels, |
const G4SurfBits | bitmasks[], | ||
std::vector< G4int > & | list, | ||
G4SurfBits * | crossed = 0 |
||
) | const |
Definition at line 859 of file G4SurfaceVoxelizer.cc.
References G4SurfBits::fAllBits, FindComponentsFastest(), fNPerSlice, fTotalCandidates, and mask.
G4int G4SurfaceVoxelizer::GetCandidatesVoxelArray | ( | const std::vector< G4int > & | voxels, |
std::vector< G4int > & | list, | ||
G4SurfBits * | crossed = 0 |
||
) | const |
Definition at line 917 of file G4SurfaceVoxelizer.cc.
References fBitmasks, and GetCandidatesVoxelArray().
|
inline |
Referenced by G4TessellatedSolid::DistanceToInCore(), G4TessellatedSolid::DistanceToOutCore(), G4TessellatedSolid::Inside(), G4TessellatedSolid::Normal(), G4TessellatedSolid::SafetyFromInside(), and G4TessellatedSolid::SafetyFromOutside().
|
static |
Definition at line 1077 of file G4SurfaceVoxelizer.cc.
References fDefaultVoxelsCount.
|
inline |
|
inline |
Referenced by G4TessellatedSolid::InsideVoxels(), and G4TessellatedSolid::SafetyFromOutside().
|
inline |
Referenced by G4TessellatedSolid::DistanceToInCore(), G4TessellatedSolid::DistanceToOutCore(), G4TessellatedSolid::InsideVoxels(), G4TessellatedSolid::Normal(), and G4TessellatedSolid::SafetyFromOutside().
|
inline |
|
inline |
Referenced by BuildEmpty(), G4TessellatedSolid::InsideVoxels(), G4TessellatedSolid::PrecalculateInsides(), and G4TessellatedSolid::SetAllUsingStack().
Referenced by G4TessellatedSolid::PrecalculateInsides(), and G4TessellatedSolid::SetAllUsingStack().
|
static |
Definition at line 957 of file G4SurfaceVoxelizer.cc.
Referenced by DistanceToBoundingBox(), and G4TessellatedSolid::MinDistanceFacet().
Definition at line 1069 of file G4SurfaceVoxelizer.cc.
References fDefaultVoxelsCount.
void G4SurfaceVoxelizer::SetMaxVoxels | ( | G4int | max | ) |
Definition at line 1055 of file G4SurfaceVoxelizer.cc.
References fMaxVoxels, fReductionRatio, and G4INCL::Math::max().
Referenced by G4TessellatedSolid::CopyObjects(), G4SurfaceVoxelizer(), and G4TessellatedSolid::SetMaxVoxels().
void G4SurfaceVoxelizer::SetMaxVoxels | ( | const G4ThreeVector & | reductionRatio | ) |
Definition at line 1062 of file G4SurfaceVoxelizer.cc.
References fMaxVoxels, and fReductionRatio.
|
private |
Definition at line 445 of file G4SurfaceVoxelizer.cc.
References fCandidatesCounts.
Referenced by Voxelize().
G4bool G4SurfaceVoxelizer::UpdateCurrentVoxel | ( | const G4ThreeVector & | point, |
const G4ThreeVector & | direction, | ||
std::vector< G4int > & | curVoxel | ||
) | const |
Definition at line 1024 of file G4SurfaceVoxelizer.cc.
References BinarySearch(), and fBoundaries.
Referenced by G4TessellatedSolid::DistanceToInCore(), G4TessellatedSolid::DistanceToOutCore(), and G4TessellatedSolid::InsideVoxels().
void G4SurfaceVoxelizer::Voxelize | ( | std::vector< G4VFacet * > & | facets | ) |
Definition at line 626 of file G4SurfaceVoxelizer.cc.
References BuildBitmasks(), BuildBoundaries(), BuildBoundingBox(), BuildEmpty(), BuildReduceVoxels(), BuildReduceVoxels2(), BuildVoxelLimits(), G4SurfBits::Clear(), CountVoxels(), CreateMiniVoxels(), fBitmasks, fBoundaries, fBoxes, fCandidatesCounts, fCountOfVoxels, fMaxVoxels, fReductionRatio, fTotalCandidates, G4cout, G4endl, SetReductionRatio(), and G4INCL::CrossSections::total().
Referenced by G4TessellatedSolid::Voxelize().
|
friend |
Definition at line 70 of file G4SurfaceVoxelizer.hh.
|
private |
Definition at line 241 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), DisplayListNodes(), GetCandidatesVoxelArray(), and Voxelize().
|
private |
Definition at line 234 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), BuildBoundaries(), BuildBoundingBox(), BuildEmpty(), Contains(), DisplayBoundaries(), DisplayListNodes(), DistanceToNext(), GetCandidatesVoxelArray(), UpdateCurrentVoxel(), and Voxelize().
|
private |
Definition at line 245 of file G4SurfaceVoxelizer.hh.
Referenced by BuildBoundingBox(), DistanceToFirst(), and G4SurfaceVoxelizer().
|
private |
Definition at line 243 of file G4SurfaceVoxelizer.hh.
Referenced by BuildBoundingBox(), DistanceToBoundingBox(), and DistanceToFirst().
|
private |
Definition at line 247 of file G4SurfaceVoxelizer.hh.
Referenced by BuildBoundingBox(), and DistanceToBoundingBox().
|
private |
Definition at line 231 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), BuildBitmasks(), BuildBoundaries(), BuildVoxelLimits(), CreateSortedBoundary(), DisplayVoxelLimits(), GetCandidatesAsString(), and Voxelize().
Definition at line 223 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), and BuildEmpty().
|
private |
Definition at line 237 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), BuildBitmasks(), BuildReduceVoxels(), BuildReduceVoxels2(), SetReductionRatio(), and Voxelize().
|
private |
Definition at line 227 of file G4SurfaceVoxelizer.hh.
Referenced by G4SurfaceVoxelizer(), and Voxelize().
|
staticprivate |
Definition at line 188 of file G4SurfaceVoxelizer.hh.
Referenced by G4SurfaceVoxelizer(), GetDefaultVoxelsCount(), and SetDefaultVoxelsCount().
|
private |
Definition at line 255 of file G4SurfaceVoxelizer.hh.
Referenced by AllocatedMemory(), and BuildEmpty().
|
private |
Definition at line 251 of file G4SurfaceVoxelizer.hh.
Referenced by SetMaxVoxels(), and Voxelize().
|
private |
Definition at line 225 of file G4SurfaceVoxelizer.hh.
|
private |
Definition at line 229 of file G4SurfaceVoxelizer.hh.
Referenced by BuildVoxelLimits(), DisplayListNodes(), G4SurfaceVoxelizer(), and GetCandidatesVoxelArray().
|
private |
Definition at line 249 of file G4SurfaceVoxelizer.hh.
Referenced by SetMaxVoxels(), and Voxelize().
|
private |
Definition at line 253 of file G4SurfaceVoxelizer.hh.
Referenced by BuildBoundaries(), BuildBoundingBox(), BuildVoxelLimits(), DistanceToNext(), and G4SurfaceVoxelizer().
|
private |
Definition at line 239 of file G4SurfaceVoxelizer.hh.
Referenced by BuildEmpty(), BuildVoxelLimits(), G4SurfaceVoxelizer(), GetCandidatesVoxelArray(), and Voxelize().
|
private |
Definition at line 221 of file G4SurfaceVoxelizer.hh.
Referenced by CreateMiniVoxels().
|
private |
Definition at line 222 of file G4SurfaceVoxelizer.hh.
Referenced by CreateMiniVoxels().