Class MeshLayer¶
- Defined in File mesh_layer.h
Class Documentation¶
-
class
MeshLayer
¶ A special type of layer just for containing the mesh.
Same general interface as a layer of blocks, but only contains a single thing, not a set of voxels.
Public Types
-
typedef AnyIndexHashMapType<Mesh::Ptr>::type
MeshMap
¶
Public Functions
-
MeshLayer
(FloatingPoint block_size)¶
-
virtual
~MeshLayer
()¶
-
const Mesh &
getMeshByIndex
(const BlockIndex &index) const¶
-
Mesh &
getMeshByIndex
(const BlockIndex &index)¶
-
Mesh::ConstPtr
getMeshPtrByIndex
(const BlockIndex &index) const¶
-
Mesh::Ptr
getMeshPtrByIndex
(const BlockIndex &index)¶
-
Mesh::Ptr
allocateMeshPtrByIndex
(const BlockIndex &index)¶ Gets a mesh by the mesh index it if already exists, otherwise allocates a new one.
-
Mesh::Ptr
allocateMeshPtrByCoordinates
(const Point &coords)¶ Gets a mesh by the coordinates it if already exists, otherwise allocates a new one.
-
BlockIndex
computeBlockIndexFromCoordinates
(const Point &coords) const¶ Coord to mesh index.
-
Mesh::Ptr
allocateNewBlock
(const BlockIndex &index)¶
-
void
removeMesh
(const BlockIndex &index)¶
-
void
getAllAllocatedMeshes
(BlockIndexList *meshes) const¶
-
void
getAllUpdatedMeshes
(BlockIndexList *meshes) const¶
-
void
getMesh
(Mesh *combined_mesh) const¶ Get mesh from mesh layer.
NOTE: The triangles and vertices in this mesh are distinct, hence, this will not produce a connected mesh.
-
void voxblox::MeshLayer::getConnectedMesh(Mesh * connected_mesh, const FloatingPoint approximate_vertex_proximity_threshold = 1e-10) const
Get a connected mesh by merging close vertices and removing triangles with zero surface area.
If you only would like to connect vertices, make sure that the proximity threhsold <<< voxel size. If you would like to simplify the mesh, chose a threshold greater or near the voxel size until you reached the level of simpliciation desired.
-
size_t
getNumberOfAllocatedMeshes
() const¶
-
void
clear
()¶ Deletes ALL parts of the mesh.
-
FloatingPoint
block_size
() const¶
-
FloatingPoint
block_size_inv
() const¶
-
typedef AnyIndexHashMapType<Mesh::Ptr>::type