Go to the documentation of this file.
31 const std::string attribute_type<EdgeHandle>::attr_group =
"edge_attributes";
32 const std::string attribute_type<OptionalEdgeHandle>::attr_group =
"edge_attributes";
33 const std::string attribute_type<VertexHandle>::attr_group =
"vertex_attributes";
34 const std::string attribute_type<OptionalVertexHandle>::attr_group =
"vertex_attributes";
35 const std::string attribute_type<FaceHandle>::attr_group =
"face_attributes";
36 const std::string attribute_type<OptionalFaceHandle>::attr_group =
"face_attributes";
37 const std::string attribute_type<ClusterHandle>::attr_group =
"cluster_attributes";
38 const std::string attribute_type<OptionalClusterHandle>::attr_group =
"cluster_attributes";
58 for(
auto fH : hem.
faces())
61 indices[i][0] = new_indices[vHs[0]];
62 indices[i][1] = new_indices[vHs[1]];
63 indices[i][2] = new_indices[vHs[2]];
74 if(vertices_opt && indices_opt)
76 auto& vertices = vertices_opt.get();
77 auto& indices = indices_opt.get();
80 for (
size_t i = 0; i < vertices.numElements(); i++)
85 for (
size_t i = 0; i < indices.numElements(); i++)
87 const std::array<VertexHandle, 3>& face = indices[i];
88 hem.
addFace(face[0], face[1], face[2]);
size_t numVertices() const final
Returns the number of vertices in the mesh.
virtual bool addVertices(const FloatChannel &channel_ptr)=0
Persistence layer interface, Writes the vertices of the mesh to the persistence layer.
size_t numFaces() const final
Returns the number of faces in the mesh.
virtual bool addIndices(const IndexChannel &channel_ptr)=0
Persistence layer interface, Writes the face indices of the mesh to the persistence layer.
Index nextVertexIndex() const
Returns the handle index which would be assigned to the next vertex that is created....
BaseVecT getVertexPosition(VertexHandle handle) const final
Get the position of the given vertex.
A map with constant lookup overhead using small-ish integer-keys.
VertexHandle addVertex(BaseVecT pos) final
Adds a vertex with the given position to the mesh.
array< VertexHandle, 3 > getVerticesOfFace(FaceHandle handle) const final
Get the three vertices surrounding the given face.
Handle to access vertices of the mesh.
FaceHandle addFace(VertexHandle v1H, VertexHandle v2H, VertexHandle v3H) final
Creates a face connecting the three given vertices.
bool containsVertex(VertexHandle vH) const
Checks if the given vertex is part of this mesh.
bool addMesh(const HalfEdgeMesh< BaseVec > &hem)
Adds a HalfEdgeMesh to the persistence layer.
boost::optional< HalfEdgeMesh< BaseVec > > getMesh()
Reads a HalfEdgeMesh from the persistence layer.
boost::optional< ValueT > insert(HandleT key, const ValueT &value) final
Inserts the given value at the given key position.
virtual FaceIteratorProxy< BaseVecT > faces() const
Method for usage in range-based for-loops.
uint32_t Index
Datatype used as index for each vertex, face and edge.
virtual IndexChannelOptional getIndices()=0
Persistence layer interface, Accesses the face indices of the mesh in the persistence layer.
void reserve(size_t newCap)
virtual FloatChannelOptional getVertices()=0
Persistence layer interface, Accesses the vertices of the mesh in the persistence layer.
Half-edge data structure implementing the BaseMesh interface.
lvr2
Author(s): Thomas Wiemann
, Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:22