69 void Voxelize(std::vector<G4VSolid*>& solids,
70 std::vector<G4Transform3D>& transforms);
71 void Voxelize(std::vector<G4VFacet*>& facets);
85 std::vector<G4int>& list,
91 std::vector<G4int>& list,
94 std::vector<G4int>& list,
97 inline const std::vector<G4VoxelBox>&
GetBoxes()
const;
105 std::vector<G4int>& curVoxel)
const;
116 std::vector<G4int>& curVoxel)
const;
126 std::vector<G4int>& voxels)
const;
141 inline long long CountVoxels(std::vector<G4double> boundaries[])
const;
143 inline const std::vector<G4int>&
163 class G4VoxelComparator
167 std::vector<G4VoxelInfo>& fVoxels;
169 G4VoxelComparator(std::vector<G4VoxelInfo>& voxels) : fVoxels(voxels) {}
175 G4int right = rv.count + fVoxels[rv.next].count;
176 return (left == right) ? l < r : left < right;
186 void CreateSortedBoundary(std::vector<G4double>& boundaryRaw,
G4int axis);
188 void BuildBoundaries();
190 void BuildReduceVoxels(std::vector<G4double> fBoundaries[],
192 void BuildReduceVoxels2(std::vector<G4double> fBoundaries[],
195 void BuildVoxelLimits(std::vector<G4VSolid*>& solids,
196 std::vector<G4Transform3D>& transforms);
197 void BuildVoxelLimits(std::vector<G4VFacet*>& facets);
201 void BuildBitmasks(std::vector<G4double> fBoundaries[],
204 void BuildBoundingBox();
210 void CreateMiniVoxels(std::vector<G4double> fBoundaries[],
212 static void FindComponentsFastest(
unsigned int mask,
213 std::vector<G4int>& list,
G4int i);
224 std::vector<G4VoxelBox> fVoxelBoxes;
225 std::vector<std::vector<G4int> > fVoxelBoxesCandidates;
226 mutable std::map<G4int, std::vector<G4int> > fCandidates;
228 const std::vector<G4int> fNoCandidates;
230 long long fCountOfVoxels;
234 std::vector<G4VoxelBox> fBoxes;
237 std::vector<G4double> fBoundaries[3];
240 std::vector<G4int> fCandidatesCounts[3];
242 G4int fTotalCandidates;
261#include "G4Voxelizer.icc"
const G4SurfBits & Empty() const
long long CountVoxels(std::vector< G4double > boundaries[]) const
G4double DistanceToBoundingBox(const G4ThreeVector &point) const
G4bool GetPointVoxel(const G4ThreeVector &p, std::vector< G4int > &voxels) const
long long GetCountOfVoxels() const
const std::vector< G4double > & GetBoundary(G4int index) const
const std::vector< G4VoxelBox > & GetBoxes() const
G4bool IsEmpty(G4int index) const
G4bool UpdateCurrentVoxel(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
void DisplayListNodes() const
void GetVoxel(std::vector< G4int > &curVoxel, const G4ThreeVector &point) const
void DisplayVoxelLimits() const
G4int GetMaxVoxels(G4ThreeVector &ratioOfReduction)
static void SetDefaultVoxelsCount(G4int count)
G4int GetBitsPerSlice() const
G4double DistanceToFirst(const G4ThreeVector &point, const G4ThreeVector &direction) const
G4int GetCandidatesVoxelArray(const G4ThreeVector &point, std::vector< G4int > &list, G4SurfBits *crossed=nullptr) const
G4int GetVoxelBoxesSize() const
static G4double MinDistanceToBox(const G4ThreeVector &aPoint, const G4ThreeVector &f)
void SetMaxVoxels(G4int max)
const G4VoxelBox & GetVoxelBox(G4int i) const
void GetCandidatesVoxel(std::vector< G4int > &voxels)
G4int GetPointIndex(const G4ThreeVector &p) const
G4int GetVoxelsIndex(const std::vector< G4int > &voxels) const
static G4int GetDefaultVoxelsCount()
static G4int BinarySearch(const std::vector< T > &vec, T value)
G4double DistanceToNext(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
void Voxelize(std::vector< G4VSolid * > &solids, std::vector< G4Transform3D > &transforms)
const std::vector< G4int > & GetVoxelBoxCandidates(G4int i) const
G4int GetVoxelsIndex(G4int x, G4int y, G4int z) const
G4bool Contains(const G4ThreeVector &point) const
const std::vector< G4int > & GetCandidates(std::vector< G4int > &curVoxel) const
G4int GetTotalCandidates() const