HalfEdgeFaceList

References
Provides access to the faces and HalfEdgeFace related functionality of a Mesh. Derived from Plankton, (c) 2013 Daniel Piker and Will Pearson, licensed LGPL v3 or later.

Properties

Count

#
public int Count { get; }
Gets the number of faces.

Indexers

this[]

#
public HalfEdgeFace this[int index] { get; }
Returns the HalfEdgeFace at the given index.
index (int)Index of face to get. Must be larger than or equal to zero and smaller than the Face Count of the mesh.
The face at the given index.

Methods

AddFace

#
public int AddFace(IEnumerable<int> indices)
Adds a new face to the end of the Face list. Creates any halfedge pairs that are required.
Remarks: The mesh must remain 2-manifold and orientable at all times.
indices (IEnumerable<int>)The vertex indices which define the face, ordered anticlockwise.
The index of the newly added face (-1 in the case that the face could not be added).

AddFace

#
public int AddFace(int a, int b, int c, int d)
Appends a new quadragular face to the end of the mesh face list. Creates any halfedge pairs that are required.
Remarks: The mesh must remain 2-manifold and orientable at all times.
a (int)Index of first corner.
b (int)Index of second corner.
c (int)Index of third corner.
d (int)Index of fourth corner.
The index of the newly added face (-1 in the case that the face could not be added).

AddFace

#
public int AddFace(int a, int b, int c)
Appends a new triangular face to the end of the mesh face list. Creates any halfedge pairs that are required.
Remarks: The mesh must remain 2-manifold and orientable at all times.
a (int)Index of first corner.
b (int)Index of second corner.
c (int)Index of third corner.
The index of the newly added face (-1 in the case that the face could not be added).

AddFaces

#
public int[] AddFaces(IEnumerable<IEnumerable<int>> faces)
Appends a list of faces to the end of the mesh face list.
faces (IEnumerable<IEnumerable<int>>)Faces to add.
Indices of the newly created faces.

FaceCentroid

#
public Vector3d FaceCentroid(int f)
obsoleteFaceCentroid is deprecated, please use GetFaceCenter instead.
f (int)

GetEnumerator

#
public IEnumerator<HalfEdgeFace> GetEnumerator()
Gets an enumerator that yields all faces in this collection.
An enumerator.

GetFaceCenter

#
public Vector3d GetFaceCenter(int f)
Gets the barycenter of a face's vertices.
f (int)A face index.
The location of the specified face's barycenter.

GetFaceVertices

#
public int[] GetFaceVertices(int f)
Gets vertex indices of a face.
f (int)A face index.
An array of vertex indices incident to the specified face. Ordered anticlockwise around the face.

GetHalfedges

#
public int[] GetHalfedges(int f)
Gets the halfedges which bound a face.
f (int)A face index.
The indices of halfedges incident to a particular face. Ordered anticlockwise around the face.

GetHalfedgesCirculator

#
public IEnumerable<int> GetHalfedgesCirculator(int f)
obsoleteGetHalfedgesCirculator(int) is deprecated, please useHalfedges.GetFaceCirculator(int) instead.
Traverses the halfedge indices which bound a face.
f (int)A face index.
An enumerable of halfedge indices incident to the specified face. Ordered anticlockwise around the face.

GetVertices

#
public int[] GetVertices(int f)
obsoleteGetVertices is deprecated, please use GetFaceVertices instead.
f (int)

MergeFaces

#
public int MergeFaces(int index)

Merges the two faces incident to the specified halfedge pair.

SplitFace(int, int)
Remarks: The invariant mesh.Faces.MergeFaces(mesh.Faces.SplitFace(a, b)) will return a, leaving the mesh unchanged.
index (int)The index of a halfedge inbetween the two faces to merge. The face adjacent to this halfedge will be retained.
The successor of index around the face, or -1 on failure.

NakedEdgeCount

#
public int NakedEdgeCount(int f)
Gets the number of naked edges which bound this face.
f (int)A face index.
The number of halfedges for which the opposite halfedge has no face (i.e. adjacent face index is -1).

RemoveFace

#
public void RemoveFace(int index)

Removes a face from the mesh without affecting the remaining geometry.

Ensures that the topology of the halfedge mesh remains fully intact.

index (int)The index of the face to be removed.

SplitFace

#
public int SplitFace(int to, int from)

Split a face into two faces by inserting a new edge

MergeFaces(int)
to (int)The index of a second halfedge adjacent to the face to split. The new edge will end at the start of this halfedge.
from (int)The index of a halfedge adjacent to the face to split. The new edge will begin at the start of this halfedge.
The index of one of the newly created halfedges, or -1 on failure. The returned halfedge will be adjacent to the pre-existing face.

Stellate

#
public int Stellate(int f)
Divides an n-sided face into n triangles, adding a new vertex in the center of the face.
f (int)The index of the face to stellate
The index of the central vertex
Explicit

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()