HalfEdgeVertexList
ReferencesProvides access to the vertices and HalfEdgeVertex related functionality of a Mesh. Derived from Plankton, (c) 2013 Daniel Piker and Will Pearson, licensed LGPL v3 or later.
Properties
Indexers
this[]
#Returns the HalfEdgeVertex at the given index.
public HalfEdgeVertex this[] { get; }
index
Index of vertex to get. Must be larger than or equal to zero and smaller than the Vertex Count of the mesh.
Returns: The vertex at the given index.
Methods
AddVertices
#Adds a series of new vertices to the end of the vertex list.
Returns: Indices of the newly created vertices.
CullUnused
#Removes all vertices that are currently not used by the Halfedge list.
Returns: The number of unused vertices that were removed.
EraseCenterVertex
#Erases a vertex and all incident halfedges by merging its incident faces.
Returns: The successor of
halfedgeIndex around its original face.GetHalfedges
#Gets the halfedges which originate from a vertex.
Returns: The indices of halfedges incident to a particular vertex. Ordered clockwise around the vertex.
GetHalfedgesCirculator
#Traverses the halfedge indices which originate from a vertex.
obsoleteGetHalfedgesCirculator(int,int) is deprecated, please useHalfedges.GetVertexCirculator(int) instead.
Returns: An enumerable of halfedge indices incident to the specified vertex. Ordered clockwise around the vertex. The returned enumerable will start with the specified halfedge.
Exceptions:
| ArgumentOutOfRangeException | The specified halfedge does not originate from the specified vertex. |
GetHalfedgesCirculator
#Traverses the halfedge indices which originate from a vertex.
obsoleteGetHalfedgesCirculator(int) is deprecated, please useHalfedges.GetVertexCirculator(int) instead.
Returns: An enumerable of halfedge indices incident to the specified vertex. Ordered clockwise around the vertex.
GetIncomingHalfedge
#Gets the first incoming halfedge for a vertex.
Returns: The index of the halfedge paired with the specified vertex's .
GetIncomingHalfedges
#Gets the halfedges which end at a vertex.
Returns: The opposing halfedge for each returned by GetHalfedges(int). Ordered clockwise around the vertex.
GetNormals
#Gets the normal vectors for all vertices in the mesh.
Remarks: This will be accurate at the time of calling but will quickly become outdated if you start fiddling with the mesh.
Returns: The area weighted vertex normals of all vertices in the mesh.
GetVertexFaces
#Gets faces incident to a vertex.
Returns: An array of face indices incident to the specified vertex. Ordered clockwise around the vertex
GetVertexNeighbours
#Gets vertex neighbours (a.k.a. 1-ring).
Returns: An array of vertex indices incident to the specified vertex. Ordered clockwise around the vertex.
IsBoundary
#A vertex is on a boundary if its outgoing halfedge has no adjacent face.
Returns:
true if the specified vertex is on a boundary; otherwise, false. Also returns true if the vertex is unused (i.e. no outgoing halfedge).MergeVertices
#Merges two vertices by collapsing the pair of halfedges between them.
HalfEdgeList.CollapseEdge(int)Remarks: The invariant
mesh.Vertices.MergeVertices(mesh.Vertices.SplitVertex(a, b)) will return a, leaving the mesh unchanged.Returns: The successor of
halfedge around its vertex, or -1 on failure.NakedEdgeCount
#Gets the number of naked edges incident to this vertex.
Returns: The number of incident halfedges which lie on a boundary.
SetVertex
#Sets or adds a vertex to the Vertex List.
If [index] is less than [Count], the existing vertex at [index] will be modified.
If [index] equals [Count], a new vertex is appended to the end of the vertex list.
If [index] is larger than [Count], the function will return false.
Returns:
true on success, false on failure.SetVertex
#Sets or adds a vertex to the Vertex List.
If [index] is less than [Count], the existing vertex at [index] will be modified.
If [index] equals [Count], a new vertex is appended to the end of the vertex list.
If [index] is larger than [Count], the function will return false.
Returns:
true on success, false on failure.SplitVertex
#Splits the vertex into two, joined by a new pair of halfedges.
Remarks: After the split, the
second halfedge will be starting at the newly added vertex.Returns: The new halfedge which starts at the existing vertex.