42 #ifndef G4SurfaceVoxelizer_HH
43 #define G4SurfaceVoxelizer_HH
77 void Voxelize(std::vector<G4VFacet *> &facets);
91 std::vector<G4int> &list,
97 std::vector<G4int> &list,
100 std::vector<G4int> &list,
103 inline const std::vector<G4VoxelBox> &
GetBoxes()
const;
111 std::vector<G4int> &curVoxel)
const;
113 inline void GetVoxel(std::vector<G4int> &curVoxel,
122 const std::vector<G4int> &curVoxel)
const;
146 inline long long CountVoxels(std::vector<G4double> boundaries[])
const;
149 std::vector<G4int> *&candidates,
150 std::vector<G4int> &space)
const;
151 inline const std::vector<G4int> &
181 G4int right = rv.count + fVoxels[rv.next].count;
182 return (left == right) ? l < r : left <
right;
217 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
friend class G4VoxelCandidatesIterator
G4ThreeVector fBoundingBoxCenter
G4int GetCandidates(std::vector< G4int > &curVoxel, std::vector< G4int > *&candidates, std::vector< G4int > &space) const
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]
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
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()