Class Face
A single face in a mesh, referring to multiple vertices. This can be a triangle if the index count is equal to three, or a polygon if the count is greater than three.
Since multiple primitive types can be contained in a single mesh, this approach allows you to better examine how the mesh is constructed. If you use the SortByPrimitiveType post process step flag during import, then each mesh will be homogenous where primitive type is concerned.
Implements
Inherited Members
Namespace: SharpAssimp
Assembly: SharpAssimp.dll
Syntax
public sealed class Face : IMarshalable<Face, AiFace>
Constructors
| Edit this page View SourceFace()
Constructs a new instance of the Face class.
Declaration
public Face()
Face(int[])
Constructs a new instance of the Face class.
Declaration
public Face(int[] indices)
Parameters
Type | Name | Description |
---|---|---|
int[] | indices | Face indices |
Properties
| Edit this page View SourceHasIndices
Gets if the face has faces (should always be true).
Declaration
public bool HasIndices { get; }
Property Value
Type | Description |
---|---|
bool |
IndexCount
Gets the number of indices defined in the face.
Declaration
public int IndexCount { get; }
Property Value
Type | Description |
---|---|
int |
Indices
Gets or sets the indices that refer to positions of vertex data in the mesh's vertex arrays.
Declaration
public List<int> Indices { get; }
Property Value
Type | Description |
---|---|
List<int> |
Methods
| Edit this page View SourceFreeNative(nint, bool)
Frees unmanaged memory created by ToNative(nint, out Native).
Declaration
public static void FreeNative(nint nativeValue, bool freeNative)
Parameters
Type | Name | Description |
---|---|---|
nint | nativeValue | Native value to free |
bool | freeNative | True if the unmanaged memory should be freed, false otherwise. |