Class Argos::TopologicMesh
ClassList > Argos > TopologicMesh
Topologically-aware mesh representation. More...
#include <TopologicMesh.h>
Public Functions
| Type | Name |
|---|---|
| TopologicMesh (std::vector< Vector3D< double > > vertices, std::vector< Face > faces) Construct a TopologicMesh from raw vertex/face data. |
|
| TopologicMesh (const Mesh & other) Construct a TopologicMesh from an existingMesh . |
|
| size_t | edgeCount () const Number of unique edges. |
| size_t | edgeFaceCount (size_t edgeIndex) Get the number of faces incident to an edge. |
| size_t | faceCount () const Number of faces. |
| std::vector< HoleInfo > | findAllHoles () const Find all topological holes (border-edge loops). |
| std::vector< int > | getAdjacentEdges (size_t edgeIndex) const Get the indices of edges adjacent to a given edge. |
| std::vector< int > | getAllBorderEdges () const Get indices of all border edges. |
| EdgeInfo | getEdge (size_t edgeIndex) const Get a human-readable edge descriptor. |
| FaceInfo | getFace (size_t faceIndex) const Get a human-readable face descriptor. |
| Vector3D< double > | getVertex (size_t index) const Get a vertex position by index. |
| const std::vector< Vector3D< double > > & | getVertices () const Const access to all deduplicated vertex positions. |
| bool | isBorder (size_t edgeIndex) const Check whether an edge is a border edge. |
| TopologicMesh & | operator= (const Mesh & other) Assign from a Mesh . |
| size_t | vertexCount () const Number of unique vertices. |
Detailed Description
Builds a deduplicated, indexed topological structure from a raw Mesh: * Deduplicates vertices within a threshold and remaps indices. * Extracts unique edges and their adjacency relationships. * Counts faces per edge to identify border edges. * Discovers holes by crawling border-edge loops.
Internal storage layout
Vertices — unique coordinates (vertices).
Edges — stored as a flat pair list so that edge[i] = [edge_vertex_pairs[2*i], edge_vertex_pairs[2*i+1]].
Faces — stored as a flat edge-index list with an offset vector so that face[i] edges are at indices [face_edge_indices[offset[i]] .. face_edge_indices[offset[i+1]-1]].
Adjacency — edge neighbours are stored contiguously: neighbours of edge i = edge_neighbor_edges[edge_neighbor_offsets[i] .. edge_neighbor_offsets[i+1]-1].
Public Functions Documentation
function TopologicMesh [1/2]
Construct a TopologicMesh from raw vertex/face data.
Argos::TopologicMesh::TopologicMesh (
std::vector< Vector3D < double > > vertices,
std::vector< Face > faces
)
Parameters:
verticesInput vertex positions (may contain duplicates).facesInput polygonal faces.
function TopologicMesh [2/2]
Construct a TopologicMesh from an existingMesh .
Parameters:
otherThe source Mesh to analyse topologically.
function edgeCount
Number of unique edges.
function edgeFaceCount
Get the number of faces incident to an edge.
Parameters:
edgeIndexIndex of the edge.
Returns:
Face count (1 = border, 2 = interior, >2 = non-manifold).
function faceCount
Number of faces.
function findAllHoles
Find all topological holes (border-edge loops).
function getAdjacentEdges
Get the indices of edges adjacent to a given edge.
Parameters:
edgeIndexIndex of the edge.
Returns:
Vector of adjacent edge indices.
function getAllBorderEdges
Get indices of all border edges.
function getEdge
Get a human-readable edge descriptor.
Parameters:
edgeIndexIndex of the edge.
Returns:
EdgeInfo containing the two endpoint vertex indices.
function getFace
Get a human-readable face descriptor.
Parameters:
faceIndexIndex of the face.
Returns:
FaceInfo containing the edges of the face.
function getVertex
Get a vertex position by index.
Parameters:
indexVertex index.
Returns:
The 3D position.
function getVertices
Const access to all deduplicated vertex positions.
function isBorder
Check whether an edge is a border edge.
Parameters:
edgeIndexIndex of the edge.
Returns:
true if the edge has only one incident face.
function operator=
Assign from a Mesh .
Parameters:
otherSource mesh.
Returns:
Reference to this TopologicMesh.
function vertexCount
Number of unique vertices.
The documentation for this class was generated from the following file include/mesh/TopologicMesh.h