54 const auto & map = blocks_[voxelId / blockSize_].smap;
55 auto it = map.find( voxelId );
56 return ( it != map.end() ) ? &it->second :
nullptr;
66 size_t blockSize_ = 0;
67 std::vector<Block> blocks_;
#define MRMESH_API
Definition MRMeshFwd.h:80
storage for points on voxel edges used in Marching Cubes algorithms
Definition MRSeparationPoint.h:25
std::vector<T>-like container that requires specific indexing type,
Definition MRVector.h:23
SeparationPointMap smap
Definition MRSeparationPoint.h:29
NeighborDir
Definition MRSeparationPoint.h:16
VertId nextVid() const
during filling, it is the id of next valid point;
Definition MRSeparationPoint.h:35
Vector< VoxelId, FaceId > faceMap
Definition MRSeparationPoint.h:38
auto findSeparationPointSet(size_t voxelId) const -> const SeparationPointSet *
finds the set (locating the block) by voxel id
Definition MRSeparationPoint.h:52
std::vector< Vector3f > coords
Definition MRSeparationPoint.h:30
Triangulation getTriangulation(Vector< VoxelId, FaceId > *outVoxelPerFaceMap=nullptr) const
combines triangulations from every block into one and returns it
Triangulation tris
Definition MRSeparationPoint.h:37
std::array< VertId, size_t(NeighborDir::Count)> SeparationPointSet
Definition MRSeparationPoint.h:20
VertId shift
after makeUniqueVids(), it is the unique id of first point in coords
Definition MRSeparationPoint.h:32
HashMap< size_t, SeparationPointSet > SeparationPointMap
Definition MRSeparationPoint.h:21
Block & getBlock(size_t blockIndex)
get block for filling in the thread responsible for it
Definition MRSeparationPoint.h:45
void resize(size_t blockCount, size_t blockSize)
prepares storage for given number of blocks, each containing given size of voxels
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMeshFwd.h:606
void getPoints(VertCoords &points) const
obtains coordinates of all stored points
@ X
Definition MRAxis.h:10
@ Z
Definition MRAxis.h:12
@ Y
Definition MRAxis.h:11
@ Count
Definition MRPdf.h:42
@ Count
Definition MRSeparationPoint.h:17
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRSeparationPoint.h:28