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

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

Indexers

this[]

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

Methods

AddFace

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

AddFace

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

AddFace

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

AddFaces

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

FaceCentroid

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

GetEnumerator

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

GetFaceCenter

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

GetFaceVertices

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

GetHalfedges

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

GetHalfedgesCirculator

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

GetVertices

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

MergeFaces

#

Merges the two faces incident to the specified halfedge pair.

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

NakedEdgeCount

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

RemoveFace

#

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

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

public void RemoveFace(
index
The index of the face to be removed.
)

SplitFace

#

Split a face into two faces by inserting a new edge

MergeFaces(int)
public int SplitFace(
to,
The index of a second halfedge adjacent to the face to split. The new edge will end at the start of this halfedge.
from
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

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

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()