41 #ifndef G4SurfaceVoxelizer_HH
42 #define G4SurfaceVoxelizer_HH
76 void Voxelize(std::vector<G4VFacet *> &facets);
90 std::vector<G4int> &list,
96 std::vector<G4int> &list,
99 std::vector<G4int> &list,
102 inline const std::vector<G4VoxelBox> &
GetBoxes()
const;
110 std::vector<G4int> &curVoxel)
const;
112 inline void GetVoxel(std::vector<G4int> &curVoxel,
121 const std::vector<G4int> &curVoxel)
const;
145 inline long long CountVoxels(std::vector<G4double> boundaries[])
const;
148 std::vector<G4int> *&candidates,
149 std::vector<G4int> &space)
const;
150 inline const std::vector<G4int> &
168 class G4VoxelComparator
172 std::vector<G4VoxelInfo> &fVoxels;
174 G4VoxelComparator(std::vector<G4VoxelInfo> &voxels) : fVoxels(voxels) {}
180 G4int right = rv.count + fVoxels[rv.next].count;
181 return (left == right) ? l < r : left <
right;
187 static int fDefaultVoxelsCount;
193 void CreateSortedBoundary(std::vector<G4double> &boundaryRaw,
G4int axis);
195 void BuildBoundaries();
197 void BuildReduceVoxels(std::vector<G4double> fBoundaries[],
199 void BuildReduceVoxels2(std::vector<G4double> fBoundaries[],
202 void BuildVoxelLimits(std::vector<G4VFacet *> &facets);
206 void BuildBitmasks(std::vector<G4double> fBoundaries[],
209 void BuildBoundingBox();
213 void CreateMiniVoxels(std::vector<G4double> fBoundaries[],
215 static void FindComponentsFastest(
unsigned int mask,
216 std::vector<G4int> &list,
G4int i);
220 std::vector<G4VoxelBox> fVoxelBoxes;
221 std::vector<std::vector<G4int> > fVoxelBoxesCandidates;
222 mutable std::map<G4int, std::vector<G4int> > fCandidates;
224 const std::vector<G4int> fNoCandidates;
226 long long fCountOfVoxels;
230 std::vector<G4VoxelBox> fBoxes;
233 std::vector<G4double> fBoundaries[3];
236 std::vector<G4int> fCandidatesCounts[3];
238 G4int fTotalCandidates;
257 #include "G4SurfaceVoxelizer.icc"