42 #ifndef G4Voxelizer_HH
43 #define G4Voxelizer_HH
76 void Voxelize(std::vector<G4VSolid *> &solids,
77 std::vector<G4Transform3D>& transforms);
78 void Voxelize(std::vector<G4VFacet *> &facets);
92 std::vector<G4int> &list,
98 std::vector<G4int> &list,
101 std::vector<G4int> &list,
104 inline const std::vector<G4VoxelBox> &
GetBoxes()
const;
112 std::vector<G4int> &curVoxel)
const;
114 inline void GetVoxel(std::vector<G4int> &curVoxel,
123 std::vector<G4int> &curVoxel)
const;
133 std::vector<G4int>& voxels)
const;
148 inline long long CountVoxels(std::vector<G4double> boundaries[])
const;
150 inline const std::vector<G4int> &
183 return (left == right) ? l < r : left <
right;
203 std::vector<G4Transform3D>& transforms);
220 std::vector<G4int> &list,
G4int i);
268 #include "G4Voxelizer.icc"
G4int GetPointIndex(const G4ThreeVector &p) const
std::vector< G4VoxelInfo > & fVoxels
T max(const T t1, const T t2)
brief Return the largest of the two arguments
const G4SurfBits & Empty() const
const std::vector< G4int > & GetVoxelBoxCandidates(G4int i) const
G4ThreeVector fBoundingBoxSize
std::vector< G4double > fBoundaries[3]
void Voxelize(std::vector< G4VSolid * > &solids, std::vector< G4Transform3D > &transforms)
G4VoxelComparator(std::vector< G4VoxelInfo > &voxels)
G4bool Contains(const G4ThreeVector &point) const
void BuildReduceVoxels(std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio)
G4bool IsEmpty(G4int index) const
G4ThreeVector GetGlobalPoint(const G4Transform3D &trans, const G4ThreeVector &lpoint) const
G4ThreeVector fReductionRatio
G4int GetCandidatesVoxelArray(const G4ThreeVector &point, std::vector< G4int > &list, G4SurfBits *crossed=0) const
std::map< G4int, std::vector< G4int > > fCandidates
void BuildVoxelLimits(std::vector< G4VSolid * > &solids, std::vector< G4Transform3D > &transforms)
void DisplayVoxelLimits() const
const std::vector< G4int > & GetCandidates(std::vector< G4int > &curVoxel) const
const std::vector< G4double > & GetBoundary(G4int index) const
long long GetCountOfVoxels() const
void BuildBitmasks(std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[], G4bool countsOnly=false)
G4int GetTotalCandidates() const
std::vector< G4int > fCandidatesCounts[3]
void SetMaxVoxels(G4int max)
void DisplayListNodes() const
void SetReductionRatio(G4int maxVoxels, G4ThreeVector &reductionRatio)
G4double DistanceToFirst(const G4ThreeVector &point, const G4ThreeVector &direction) const
std::vector< std::vector< G4int > > fVoxelBoxesCandidates
const std::vector< G4int > fNoCandidates
G4bool GetPointVoxel(const G4ThreeVector &p, std::vector< G4int > &voxels) const
G4int GetMaxVoxels(G4ThreeVector &ratioOfReduction)
const XML_Char int const XML_Char * value
G4String GetCandidatesAsString(const G4SurfBits &bits) const
std::vector< G4VoxelBox > fVoxelBoxes
void GetCandidatesVoxel(std::vector< G4int > &voxels)
G4int GetVoxelBoxesSize() const
static G4double MinDistanceToBox(const G4ThreeVector &aPoint, const G4ThreeVector &f)
static void FindComponentsFastest(unsigned int mask, std::vector< G4int > &list, G4int i)
const std::vector< G4VoxelBox > & GetBoxes() const
void CreateSortedBoundary(std::vector< G4double > &boundaryRaw, G4int axis)
long long CountVoxels(std::vector< G4double > boundaries[]) const
G4double DistanceToNext(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
std::vector< G4VoxelBox > fBoxes
G4int GetBitsPerSlice() const
G4ThreeVector fBoundingBoxCenter
G4bool UpdateCurrentVoxel(const G4ThreeVector &point, const G4ThreeVector &direction, std::vector< G4int > &curVoxel) const
static G4ThreadLocal G4int fDefaultVoxelsCount
G4double DistanceToBoundingBox(const G4ThreeVector &point) const
void BuildReduceVoxels2(std::vector< G4double > fBoundaries[], G4ThreeVector reductionRatio)
G4bool operator()(const G4int &l, const G4int &r) const
void TransformLimits(G4ThreeVector &min, G4ThreeVector &max, const G4Transform3D &transformation) const
void GetVoxel(std::vector< G4int > &curVoxel, const G4ThreeVector &point) const
G4int GetVoxelsIndex(G4int x, G4int y, G4int z) const
void CreateMiniVoxels(std::vector< G4double > fBoundaries[], G4SurfBits bitmasks[])
static G4int BinarySearch(const std::vector< T > &vec, T value)
const G4VoxelBox & GetVoxelBox(G4int i) const
static G4int GetDefaultVoxelsCount()
static void SetDefaultVoxelsCount(G4int count)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments