WCSim
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
G4Voxelizer_v1072 Class Reference

#include <G4Voxelizer_v1072.hh>

Collaboration diagram for G4Voxelizer_v1072:
Collaboration graph

Classes

class  G4VoxelComparator
 

Public Member Functions

void Voxelize (std::vector< G4VSolid *> &solids, std::vector< G4Transform3D > &transforms)
 
void Voxelize (std::vector< G4VFacet *> &facets)
 
void DisplayVoxelLimits () const
 
void DisplayBoundaries ()
 
void DisplayListNodes () const
 
 G4Voxelizer_v1072 ()
 
 ~G4Voxelizer_v1072 ()
 
void GetCandidatesVoxel (std::vector< G4int > &voxels)
 
G4int GetCandidatesVoxelArray (const G4ThreeVector &point, std::vector< G4int > &list, G4SurfBits *crossed=nullptr) const
 
G4int GetCandidatesVoxelArray (const std::vector< G4int > &voxels, const G4SurfBits bitmasks[], std::vector< G4int > &list, G4SurfBits *crossed=nullptr) const
 
G4int GetCandidatesVoxelArray (const std::vector< G4int > &voxels, std::vector< G4int > &list, G4SurfBits *crossed=nullptr) const
 
const std::vector< G4VoxelBox_v1072 > & 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, 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
 
G4bool GetPointVoxel (const G4ThreeVector &p, 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
 
const std::vector< G4int > & GetCandidates (std::vector< G4int > &curVoxel) const
 
G4int GetVoxelBoxesSize () const
 
const G4VoxelBox_v1072GetVoxelBox (G4int i) const
 
const std::vector< G4int > & GetVoxelBoxCandidates (G4int i) const
 
G4int GetTotalCandidates () 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 void 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< G4VSolid *> &solids, std::vector< G4Transform3D > &transforms)
 
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 BuildBoundingBox (G4ThreeVector &amin, G4ThreeVector &amax, G4double tolerance=0.0)
 
void SetReductionRatio (G4int maxVoxels, G4ThreeVector &reductionRatio)
 
void CreateMiniVoxels (std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[])
 
G4ThreeVector GetGlobalPoint (const G4Transform3D &trans, const G4ThreeVector &lpoint) const
 
void TransformLimits (G4ThreeVector &min, G4ThreeVector &max, const G4Transform3D &transformation) const
 

Static Private Member Functions

static void FindComponentsFastest (unsigned int mask, std::vector< G4int > &list, G4int i)
 

Private Attributes

std::vector< G4VoxelBox_v1072fVoxelBoxes
 
std::vector< std::vector< G4int > > fVoxelBoxesCandidates
 
std::map< G4int, std::vector< G4int > > fCandidates
 
const std::vector< G4intfNoCandidates
 
long long fCountOfVoxels
 
G4int fNPerSlice
 
std::vector< G4VoxelBox_v1072fBoxes
 
std::vector< G4doublefBoundaries [3]
 
std::vector< G4intfCandidatesCounts [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
 

Detailed Description

Definition at line 67 of file G4Voxelizer_v1072.hh.

Constructor & Destructor Documentation

◆ G4Voxelizer_v1072()

G4Voxelizer_v1072::G4Voxelizer_v1072 ( )

Definition at line 61 of file G4Voxelizer_v1072.cc.

◆ ~G4Voxelizer_v1072()

G4Voxelizer_v1072::~G4Voxelizer_v1072 ( )

Definition at line 74 of file G4Voxelizer_v1072.cc.

Member Function Documentation

◆ AllocatedMemory()

G4int G4Voxelizer_v1072::AllocatedMemory ( )

Definition at line 1370 of file G4Voxelizer_v1072.cc.

◆ BinarySearch()

template<typename T >
G4int G4Voxelizer_v1072::BinarySearch ( const std::vector< T > &  vec,
value 
)
inlinestatic

Definition at line 273 of file G4Voxelizer_v1072.hh.

◆ BuildBitmasks()

void G4Voxelizer_v1072::BuildBitmasks ( std::vector< G4double fBoundaries[],
G4SurfBits  bitmasks[],
G4bool  countsOnly = false 
)
private

Definition at line 361 of file G4Voxelizer_v1072.cc.

◆ BuildBoundaries()

void G4Voxelizer_v1072::BuildBoundaries ( )
private

Definition at line 254 of file G4Voxelizer_v1072.cc.

◆ BuildBoundingBox() [1/2]

void G4Voxelizer_v1072::BuildBoundingBox ( )
private

Definition at line 466 of file G4Voxelizer_v1072.cc.

◆ BuildBoundingBox() [2/2]

void G4Voxelizer_v1072::BuildBoundingBox ( G4ThreeVector amin,
G4ThreeVector amax,
G4double  tolerance = 0.0 
)
private

Definition at line 478 of file G4Voxelizer_v1072.cc.

◆ BuildEmpty()

void G4Voxelizer_v1072::BuildEmpty ( )
private

Definition at line 79 of file G4Voxelizer_v1072.cc.

◆ BuildReduceVoxels()

void G4Voxelizer_v1072::BuildReduceVoxels ( std::vector< G4double fBoundaries[],
G4ThreeVector  reductionRatio 
)
private

Definition at line 525 of file G4Voxelizer_v1072.cc.

◆ BuildReduceVoxels2()

void G4Voxelizer_v1072::BuildReduceVoxels2 ( std::vector< G4double fBoundaries[],
G4ThreeVector  reductionRatio 
)
private

Definition at line 680 of file G4Voxelizer_v1072.cc.

◆ BuildVoxelLimits() [1/2]

void G4Voxelizer_v1072::BuildVoxelLimits ( std::vector< G4VSolid *> &  solids,
std::vector< G4Transform3D > &  transforms 
)
private

Definition at line 122 of file G4Voxelizer_v1072.cc.

◆ BuildVoxelLimits() [2/2]

void G4Voxelizer_v1072::BuildVoxelLimits ( std::vector< G4VFacet *> &  facets)
private

Definition at line 174 of file G4Voxelizer_v1072.cc.

◆ Contains()

G4bool G4Voxelizer_v1072::Contains ( const G4ThreeVector point) const

Definition at line 1171 of file G4Voxelizer_v1072.cc.

◆ CountVoxels()

long long G4Voxelizer_v1072::CountVoxels ( std::vector< G4double boundaries[]) const
inline

Definition at line 386 of file G4Voxelizer_v1072.hh.

◆ CreateMiniVoxels()

void G4Voxelizer_v1072::CreateMiniVoxels ( std::vector< G4double fBoundaries[],
G4SurfBits  bitmasks[] 
)
private

Definition at line 741 of file G4Voxelizer_v1072.cc.

◆ CreateSortedBoundary()

void G4Voxelizer_v1072::CreateSortedBoundary ( std::vector< G4double > &  boundaryRaw,
G4int  axis 
)
private

Definition at line 224 of file G4Voxelizer_v1072.cc.

◆ DisplayBoundaries() [1/2]

void G4Voxelizer_v1072::DisplayBoundaries ( )

Definition at line 334 of file G4Voxelizer_v1072.cc.

◆ DisplayBoundaries() [2/2]

void G4Voxelizer_v1072::DisplayBoundaries ( std::vector< G4double > &  fBoundaries)
private

Definition at line 345 of file G4Voxelizer_v1072.cc.

◆ DisplayListNodes()

void G4Voxelizer_v1072::DisplayListNodes ( ) const

Definition at line 441 of file G4Voxelizer_v1072.cc.

◆ DisplayVoxelLimits()

void G4Voxelizer_v1072::DisplayVoxelLimits ( ) const

Definition at line 207 of file G4Voxelizer_v1072.cc.

◆ DistanceToBoundingBox()

G4double G4Voxelizer_v1072::DistanceToBoundingBox ( const G4ThreeVector point) const

Definition at line 1193 of file G4Voxelizer_v1072.cc.

◆ DistanceToFirst()

G4double G4Voxelizer_v1072::DistanceToFirst ( const G4ThreeVector point,
const G4ThreeVector direction 
) const

Definition at line 1183 of file G4Voxelizer_v1072.cc.

◆ DistanceToNext()

G4double G4Voxelizer_v1072::DistanceToNext ( const G4ThreeVector point,
const G4ThreeVector direction,
std::vector< G4int > &  curVoxel 
) const

Definition at line 1228 of file G4Voxelizer_v1072.cc.

◆ Empty()

const G4SurfBits & G4Voxelizer_v1072::Empty ( ) const
inline

Definition at line 361 of file G4Voxelizer_v1072.hh.

◆ FindComponentsFastest()

void G4Voxelizer_v1072::FindComponentsFastest ( unsigned int  mask,
std::vector< G4int > &  list,
G4int  i 
)
staticprivate

Definition at line 921 of file G4Voxelizer_v1072.cc.

◆ GetBitsPerSlice()

G4int G4Voxelizer_v1072::GetBitsPerSlice ( ) const
inline

Definition at line 308 of file G4Voxelizer_v1072.hh.

◆ GetBoundary()

const std::vector< G4double > & G4Voxelizer_v1072::GetBoundary ( G4int  index) const
inline

Definition at line 286 of file G4Voxelizer_v1072.hh.

◆ GetBoxes()

const std::vector< G4VoxelBox_v1072 > & G4Voxelizer_v1072::GetBoxes ( ) const
inline

Definition at line 280 of file G4Voxelizer_v1072.hh.

◆ GetCandidates()

const std::vector< G4int > & G4Voxelizer_v1072::GetCandidates ( std::vector< G4int > &  curVoxel) const
inline

Definition at line 397 of file G4Voxelizer_v1072.hh.

◆ GetCandidatesAsString()

G4String G4Voxelizer_v1072::GetCandidatesAsString ( const G4SurfBits &  bits) const
private

Definition at line 426 of file G4Voxelizer_v1072.cc.

◆ GetCandidatesVoxel()

void G4Voxelizer_v1072::GetCandidatesVoxel ( std::vector< G4int > &  voxels)

Definition at line 906 of file G4Voxelizer_v1072.cc.

◆ GetCandidatesVoxelArray() [1/3]

G4int G4Voxelizer_v1072::GetCandidatesVoxelArray ( const G4ThreeVector point,
std::vector< G4int > &  list,
G4SurfBits *  crossed = nullptr 
) const

Definition at line 983 of file G4Voxelizer_v1072.cc.

◆ GetCandidatesVoxelArray() [2/3]

G4int G4Voxelizer_v1072::GetCandidatesVoxelArray ( const std::vector< G4int > &  voxels,
const G4SurfBits  bitmasks[],
std::vector< G4int > &  list,
G4SurfBits *  crossed = nullptr 
) const

Definition at line 1104 of file G4Voxelizer_v1072.cc.

◆ GetCandidatesVoxelArray() [3/3]

G4int G4Voxelizer_v1072::GetCandidatesVoxelArray ( const std::vector< G4int > &  voxels,
std::vector< G4int > &  list,
G4SurfBits *  crossed = nullptr 
) const

Definition at line 1162 of file G4Voxelizer_v1072.cc.

◆ GetCountOfVoxels()

long long G4Voxelizer_v1072::GetCountOfVoxels ( ) const
inline

Definition at line 380 of file G4Voxelizer_v1072.hh.

◆ GetDefaultVoxelsCount()

G4int G4Voxelizer_v1072::GetDefaultVoxelsCount ( )
static

Definition at line 1364 of file G4Voxelizer_v1072.cc.

◆ GetGlobalPoint()

G4ThreeVector G4Voxelizer_v1072::GetGlobalPoint ( const G4Transform3D &  trans,
const G4ThreeVector lpoint 
) const
inlineprivate

Definition at line 435 of file G4Voxelizer_v1072.hh.

◆ GetMaxVoxels()

G4int G4Voxelizer_v1072::GetMaxVoxels ( G4ThreeVector ratioOfReduction)
inline

Definition at line 373 of file G4Voxelizer_v1072.hh.

◆ GetPointIndex()

G4int G4Voxelizer_v1072::GetPointIndex ( const G4ThreeVector p) const
inline

Definition at line 349 of file G4Voxelizer_v1072.hh.

◆ GetPointVoxel()

G4bool G4Voxelizer_v1072::GetPointVoxel ( const G4ThreeVector p,
std::vector< G4int > &  voxels 
) const
inline

Definition at line 330 of file G4Voxelizer_v1072.hh.

◆ GetTotalCandidates()

G4int G4Voxelizer_v1072::GetTotalCandidates ( ) const
inline

Definition at line 409 of file G4Voxelizer_v1072.hh.

◆ GetVoxel()

void G4Voxelizer_v1072::GetVoxel ( std::vector< G4int > &  curVoxel,
const G4ThreeVector point 
) const
inline

Definition at line 292 of file G4Voxelizer_v1072.hh.

◆ GetVoxelBox()

const G4VoxelBox_v1072 & G4Voxelizer_v1072::GetVoxelBox ( G4int  i) const
inline

Definition at line 421 of file G4Voxelizer_v1072.hh.

◆ GetVoxelBoxCandidates()

const std::vector< G4int > & G4Voxelizer_v1072::GetVoxelBoxCandidates ( G4int  i) const
inline

Definition at line 428 of file G4Voxelizer_v1072.hh.

◆ GetVoxelBoxesSize()

G4int G4Voxelizer_v1072::GetVoxelBoxesSize ( ) const
inline

Definition at line 415 of file G4Voxelizer_v1072.hh.

◆ GetVoxelsIndex() [1/2]

G4int G4Voxelizer_v1072::GetVoxelsIndex ( G4int  x,
G4int  y,
G4int  z 
) const
inline

Definition at line 314 of file G4Voxelizer_v1072.hh.

◆ GetVoxelsIndex() [2/2]

G4int G4Voxelizer_v1072::GetVoxelsIndex ( const std::vector< G4int > &  voxels) const
inline

Definition at line 324 of file G4Voxelizer_v1072.hh.

◆ IsEmpty()

G4bool G4Voxelizer_v1072::IsEmpty ( G4int  index) const
inline

Definition at line 367 of file G4Voxelizer_v1072.hh.

◆ MinDistanceToBox()

G4double G4Voxelizer_v1072::MinDistanceToBox ( const G4ThreeVector aPoint,
const G4ThreeVector f 
)
static

Definition at line 1202 of file G4Voxelizer_v1072.cc.

◆ SetDefaultVoxelsCount()

void G4Voxelizer_v1072::SetDefaultVoxelsCount ( G4int  count)
static

Definition at line 1358 of file G4Voxelizer_v1072.cc.

◆ SetMaxVoxels() [1/2]

void G4Voxelizer_v1072::SetMaxVoxels ( G4int  max)

Definition at line 1344 of file G4Voxelizer_v1072.cc.

◆ SetMaxVoxels() [2/2]

void G4Voxelizer_v1072::SetMaxVoxels ( const G4ThreeVector reductionRatio)

Definition at line 1351 of file G4Voxelizer_v1072.cc.

◆ SetReductionRatio()

void G4Voxelizer_v1072::SetReductionRatio ( G4int  maxVoxels,
G4ThreeVector reductionRatio 
)
private

Definition at line 509 of file G4Voxelizer_v1072.cc.

◆ TransformLimits()

void G4Voxelizer_v1072::TransformLimits ( G4ThreeVector min,
G4ThreeVector max,
const G4Transform3D &  transformation 
) const
private

Definition at line 940 of file G4Voxelizer_v1072.cc.

◆ UpdateCurrentVoxel()

G4bool G4Voxelizer_v1072::UpdateCurrentVoxel ( const G4ThreeVector point,
const G4ThreeVector direction,
std::vector< G4int > &  curVoxel 
) const

Definition at line 1313 of file G4Voxelizer_v1072.cc.

◆ Voxelize() [1/2]

void G4Voxelizer_v1072::Voxelize ( std::vector< G4VSolid *> &  solids,
std::vector< G4Transform3D > &  transforms 
)

Definition at line 723 of file G4Voxelizer_v1072.cc.

◆ Voxelize() [2/2]

void G4Voxelizer_v1072::Voxelize ( std::vector< G4VFacet *> &  facets)

Definition at line 777 of file G4Voxelizer_v1072.cc.

Member Data Documentation

◆ fBitmasks

G4SurfBits G4Voxelizer_v1072::fBitmasks[3]
private

Definition at line 249 of file G4Voxelizer_v1072.hh.

◆ fBoundaries

std::vector<G4double> G4Voxelizer_v1072::fBoundaries[3]
private

Definition at line 242 of file G4Voxelizer_v1072.hh.

◆ fBoundingBox

G4Box G4Voxelizer_v1072::fBoundingBox
private

Definition at line 253 of file G4Voxelizer_v1072.hh.

◆ fBoundingBoxCenter

G4ThreeVector G4Voxelizer_v1072::fBoundingBoxCenter
private

Definition at line 251 of file G4Voxelizer_v1072.hh.

◆ fBoundingBoxSize

G4ThreeVector G4Voxelizer_v1072::fBoundingBoxSize
private

Definition at line 255 of file G4Voxelizer_v1072.hh.

◆ fBoxes

std::vector<G4VoxelBox_v1072> G4Voxelizer_v1072::fBoxes
private

Definition at line 239 of file G4Voxelizer_v1072.hh.

◆ fCandidates

std::map<G4int, std::vector<G4int> > G4Voxelizer_v1072::fCandidates
mutableprivate

Definition at line 231 of file G4Voxelizer_v1072.hh.

◆ fCandidatesCounts

std::vector<G4int> G4Voxelizer_v1072::fCandidatesCounts[3]
private

Definition at line 245 of file G4Voxelizer_v1072.hh.

◆ fCountOfVoxels

long long G4Voxelizer_v1072::fCountOfVoxels
private

Definition at line 235 of file G4Voxelizer_v1072.hh.

◆ fDefaultVoxelsCount

G4ThreadLocal G4int G4Voxelizer_v1072::fDefaultVoxelsCount = -1
staticprivate

Definition at line 227 of file G4Voxelizer_v1072.hh.

◆ fEmpty

G4SurfBits G4Voxelizer_v1072::fEmpty
private

Definition at line 263 of file G4Voxelizer_v1072.hh.

◆ fMaxVoxels

G4int G4Voxelizer_v1072::fMaxVoxels
private

Definition at line 259 of file G4Voxelizer_v1072.hh.

◆ fNoCandidates

const std::vector<G4int> G4Voxelizer_v1072::fNoCandidates
private

Definition at line 233 of file G4Voxelizer_v1072.hh.

◆ fNPerSlice

G4int G4Voxelizer_v1072::fNPerSlice
private

Definition at line 237 of file G4Voxelizer_v1072.hh.

◆ fReductionRatio

G4ThreeVector G4Voxelizer_v1072::fReductionRatio
private

Definition at line 257 of file G4Voxelizer_v1072.hh.

◆ fTolerance

G4double G4Voxelizer_v1072::fTolerance
private

Definition at line 261 of file G4Voxelizer_v1072.hh.

◆ fTotalCandidates

G4int G4Voxelizer_v1072::fTotalCandidates
private

Definition at line 247 of file G4Voxelizer_v1072.hh.

◆ fVoxelBoxes

std::vector<G4VoxelBox_v1072> G4Voxelizer_v1072::fVoxelBoxes
private

Definition at line 229 of file G4Voxelizer_v1072.hh.

◆ fVoxelBoxesCandidates

std::vector<std::vector<G4int> > G4Voxelizer_v1072::fVoxelBoxesCandidates
private

Definition at line 230 of file G4Voxelizer_v1072.hh.


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