42 #ifndef G4SurfaceVoxelizer_HH
43 #define G4SurfaceVoxelizer_HH
73 void Voxelize(std::vector<G4VFacet *> &facets);
87 std::vector<G4int> &list,
93 std::vector<G4int> &list,
96 std::vector<G4int> &list,
99 inline const std::vector<G4VoxelBox> &
GetBoxes()
const;
107 std::vector<G4int> &curVoxel)
const;
109 inline void GetVoxel(std::vector<G4int> &curVoxel,
118 const std::vector<G4int> &curVoxel)
const;
142 inline long long CountVoxels(std::vector<G4double> boundaries[])
const;
144 inline const std::vector<G4int> &
176 G4int right = rv.count + fVoxels[rv.next].count;
177 return (left == right) ? l < r : left <
right;
212 std::vector<G4int> &list,
G4int i);
G4bool Contains(const G4ThreeVector &point) const
G4ThreeVector fBoundingBoxSize
void BuildReduceVoxels(std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio)
void DisplayListNodes() const
std::vector< G4VoxelInfo > & fVoxels
G4int GetCandidatesVoxelArray(const G4ThreeVector &point, std::vector< G4int > &list, G4SurfBits *crossed=0) const
std::vector< G4VoxelBox > fVoxelBoxes
void Voxelize(std::vector< G4VFacet * > &facets)
CLHEP::Hep3Vector G4ThreeVector
G4ThreeVector fBoundingBoxCenter
G4double DistanceToFirst(const G4ThreeVector &point, const G4ThreeVector &direction) const
G4double DistanceToBoundingBox(const G4ThreeVector &point) const
std::vector< G4int > fCandidatesCounts[3]
G4bool operator()(const G4int &l, const G4int &r) const
void BuildVoxelLimits(std::vector< G4VFacet * > &facets)
G4int GetVoxelsIndex(G4int x, G4int y, G4int z) const
G4String GetCandidatesAsString(const G4SurfBits &bits) const
void DisplayVoxelLimits()
static G4double MinDistanceToBox(const G4ThreeVector &aPoint, const G4ThreeVector &f)
G4bool UpdateCurrentVoxel(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
G4int GetBitsPerSlice() const
static G4ThreadLocal G4int fDefaultVoxelsCount
G4int GetPointIndex(const G4ThreeVector &p) const
std::map< G4int, std::vector< G4int > > fCandidates
G4bool IsEmpty(G4int index) const
static G4int BinarySearch(const std::vector< T > &vec, T value)
void SetReductionRatio(G4int maxVoxels, G4ThreeVector &reductionRatio)
std::vector< std::vector< G4int > > fVoxelBoxesCandidates
void GetVoxel(std::vector< G4int > &curVoxel, const G4ThreeVector &point) const
void CreateMiniVoxels(std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[])
void BuildBitmasks(std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[], G4bool countsOnly=false)
std::vector< G4VoxelBox > fBoxes
G4double DistanceToNext(const G4ThreeVector &point, const G4ThreeVector &direction, const std::vector< G4int > &curVoxel) const
void SetMaxVoxels(G4int max)
const std::vector< G4VoxelBox > & GetBoxes() const
std::vector< G4double > fBoundaries[3]
const std::vector< G4int > & GetCandidates(std::vector< G4int > &curVoxel) const
static G4int SetDefaultVoxelsCount(G4int count)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4ThreeVector fReductionRatio
static void FindComponentsFastest(unsigned int mask, std::vector< G4int > &list, G4int i)
void BuildReduceVoxels2(std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio)
void GetCandidatesVoxel(std::vector< G4int > &voxels)
G4VoxelComparator(std::vector< G4VoxelInfo > &voxels)
long long GetCountOfVoxels() const
const std::vector< G4double > & GetBoundary(G4int index) const
G4int GetTotalCandidates() const
const G4SurfBits & Empty() const
G4int GetMaxVoxels(G4ThreeVector &ratioOfReduction)
void CreateSortedBoundary(std::vector< G4double > &boundaryRaw, G4int axis)
const std::vector< G4int > & GetVoxelBoxCandidates(G4int i) const
const std::vector< G4int > fNoCandidates
G4int GetVoxelBoxesSize() const
long long CountVoxels(std::vector< G4double > boundaries[]) const
const G4VoxelBox & GetVoxelBox(G4int i) const
static G4int GetDefaultVoxelsCount()