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
Get the number of vertices in this ngon. MeshNgon about length information.
public int BoundaryVertexCount { get; }

Empty

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

FaceCount

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

Indexers

this[]

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

Methods

BoundaryVertexIndexList

#Since v6.0
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.

[CLSCompliant(false)] public uint[] BoundaryVertexIndexList()
A list of mesh vertex indexes.
MeshNgon

CompareTo

#Since v6.0
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.

public int CompareTo(
otherNgon
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
Constructs an ngon from lists of mesh vertex and face indexes.
public static MeshNgon Create(
meshVertexIndexList,
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
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
Determines if this ngon and otherNgon are identical.
public bool Equals(
otherNgon
The other ngon for comparison.
)
true if otherNgon is identical to this ngon; otherwise false.

Equals

#
Determines if otherObj is a MeshNgon and is identical to this ngon.
public override bool Equals(
otherObj
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
Get the ngon's mesh face index list.
[CLSCompliant(false)] public uint[] FaceIndexList()
A list of mesh face indexes.

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.
public override int GetHashCode()
A non-unique integer that represents this mesh ngon.

Set

#Since v6.0
Set the ngon vertex and face index lists.
public void Set(
meshVertexIndexList,
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
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(
obj
)

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.
public override string ToString()
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.