MeshNgon

References
Represents a mesh ngon.

When retrieved from the Ngon property of a mesh, this contains faces that have edge valence strictly higher than 4.

When retrieving Ngons from Mesh.GetNgonAndFacesEnumerable(), this might contain also triangles and quads.

Properties

BoundaryVertexCount

#Since v6.0
public int BoundaryVertexCount { get; }
Get the number of vertices in this ngon. MeshNgon about length information.

Empty

#Since v6.0
public static MeshNgon Empty { get; }
Gets an empty MeshNgon.

FaceCount

#Since v6.0
public int FaceCount { get; }
Get the number of faces in this ngon.

Indexers

this[]

#
public int this[int index] { get; }
Get a mesh vertex index from the ngon's vertex index list.
index (int)A mesh vertex number between 0 and MeshNgon.VertexCount-1 that refers to a mesh vertex index in this ngon.
A mesh vertex index.

Methods

BoundaryVertexIndexList

#Since v6.0
[CLSCompliant(false)] public uint[] BoundaryVertexIndexList()
Get the outer boundary mesh vertex list of the ngon.

Vertices are sorted counterclockwise with respect to the direction of the face, although the degree by which vertex normals will respect this might vary.

A list of mesh vertex indexes.

CompareTo

#Since v6.0
public int CompareTo(MeshNgon otherNgon)
Compares this MeshNgon with otherNgon and returns a value of 1, 0, or -1.

Priority is for vertex count, then face count, then vertex index list values, then face index list values.

otherNgon (MeshNgon)The other MeshNgon to use in comparison.

0: if this is identical to otherNgon

-1: if this < otherNgon.

+1: if this > otherNgon.

Create

#Since v6.0
public static MeshNgon Create(IList<int> meshVertexIndexList, IList<int> meshFaceIndexList)
Constructs an ngon from lists of mesh vertex and face indexes.
meshVertexIndexList (IList<int>)A list of mesh vertex indexes that define the outer boundary of the ngon. The mesh vertex indexes must be in the correct order.
meshFaceIndexList (IList<int>)A list of mesh face indexes that define the interior of the ngon. The mesh face indexes may be in any order.

Equals

#Since v6.0
public bool Equals(MeshNgon otherNgon)
Determines if this ngon and otherNgon are identical.
otherNgon (MeshNgon)The other ngon for comparison.
true if otherNgon is identical to this ngon; otherwise false.

Equals

#
public override bool Equals(object otherObj)
Determines if otherObj is a MeshNgon and is identical to this ngon.
otherObj (object)Any object the represents the other mesh face for comparison.
true if otherObj is a MeshNgon and is identical to this ngon; otherwise false.
Object.Equals

FaceIndexList

#Since v6.0
[CLSCompliant(false)] public uint[] FaceIndexList()
Get the ngon's mesh face index list.
A list of mesh face indexes.

GetHashCode

#
public override int GetHashCode()
Returns a runtime-stable hash code for the current mesh ngon. You are not allowed to rely on persistence of this hash code in serialization, but for each instance of the application, this hash code will be the same for ngons with identical vertex and face lists.
A non-unique integer that represents this mesh ngon.

Set

#Since v6.0
public void Set(IList<int> meshVertexIndexList, IList<int> meshFaceIndexList)
Set the ngon vertex and face index lists.
meshVertexIndexList (IList<int>)A list of mesh vertex indexes that define the outer boundary of the ngon. The mesh vertex indexes must be in the correct order.
meshFaceIndexList (IList<int>)A list of mesh face indexes that define the interior of the ngon. The mesh face indexes may be in any order.
Explicit

IComparable.CompareTo

#
int IComparable.CompareTo(object obj)
obj (object)

ToString

#
public override string ToString()
Returns a string representation for this MeshNgon. This is to provide a meaningful visualization of this structure and is subject to change in newer releases.
The string representation.
Object.ToString

Operators

OperationResultDescription
MeshNgon==MeshNgonboolDetermines whether two MeshNgon structures have equal values.
MeshNgon!=MeshNgonboolDetermines whether two MeshNgon structures have different values.