Class MeshAnimationAttachment
A mesh attachment store per-vertex animations for a particular frame. You may think of this as a 'patch' for the host mesh, since the mesh attachment replaces only certain vertex data streams at a particular time. Each mesh stores 'n' attached meshes. The actual relationship between the time line and mesh attachments is established by the mesh animation channel, which references singular mesh attachments by their ID and binds them to a time offset.
Implements
Inherited Members
Namespace: SharpAssimp
Assembly: SharpAssimp.dll
Syntax
public sealed class MeshAnimationAttachment : IMarshalable<MeshAnimationAttachment, AiAnimMesh>
Constructors
| Edit this page View SourceMeshAnimationAttachment()
Constructs a new instance of the MeshAnimationAttachment class.
Declaration
public MeshAnimationAttachment()
Properties
| Edit this page View SourceBiTangents
Gets the vertex bitangent list.
Declaration
public List<Vector3> BiTangents { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
HasNormals
Checks whether the attachment mesh overrides the vertex normals of its host mesh.
Declaration
public bool HasNormals { get; }
Property Value
Type | Description |
---|---|
bool |
HasTangentBasis
Checks whether the attachment mesh overrides the vertex tangents and bitangents of its host mesh.
Declaration
public bool HasTangentBasis { get; }
Property Value
Type | Description |
---|---|
bool |
HasVertices
Checks whether the attachment mesh overrides the vertex positions of its host mesh.
Declaration
public bool HasVertices { get; }
Property Value
Type | Description |
---|---|
bool |
Name
Gets or sets the mesh animation name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Normals
Gets the vertex normal list.
Declaration
public List<Vector3> Normals { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
Tangents
Gets the vertex tangent list.
Declaration
public List<Vector3> Tangents { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
TextureCoordinateChannelCount
Gets the number of valid texture coordinate channels contained in the mesh (list is not empty/not null). This can be a value between zero and the maximum texture coordinate count. Each individual channel should be the size of VertexCount.
Declaration
public int TextureCoordinateChannelCount { get; }
Property Value
Type | Description |
---|---|
int |
TextureCoordinateChannels
Gets the array that contains each texture coordinate channel that override a specific channel in the host mesh, by default all are lists of zero (but can be set to null). Each index in the array corresponds to the texture coordinate channel. The length of the array corresponds to Assimp's maximum UV channel limit.
Declaration
public List<Vector3>[] TextureCoordinateChannels { get; }
Property Value
Type | Description |
---|---|
List<Vector3>[] |
VertexColorChannelCount
Gets the number of valid vertex color channels contained in the mesh (list is not empty/not null). This can be a value between zero and the maximum vertex color count. Each individual channel should be the size of VertexCount.
Declaration
public int VertexColorChannelCount { get; }
Property Value
Type | Description |
---|---|
int |
VertexColorChannels
Gets the array that contains each vertex color channels that override a specific channel in the host mesh, by default all are lists of zero (but can be set to null). Each index in the array corresponds to the texture coordinate channel. The length of the array corresponds to Assimp's maximum vertex color channel limit.
Declaration
public List<Vector4>[] VertexColorChannels { get; }
Property Value
Type | Description |
---|---|
List<Vector4>[] |
VertexCount
Gets the number of vertices in this mesh. This is a replacement for the host mesh's vertex count. Likewise, a mesh attachment cannot add or remove per-vertex attributes, therefore the existance of vertex data will match the existance of data in the mesh.
Declaration
public int VertexCount { get; }
Property Value
Type | Description |
---|---|
int |
Vertices
Gets the vertex position list.
Declaration
public List<Vector3> Vertices { get; }
Property Value
Type | Description |
---|---|
List<Vector3> |
Weight
Gets or sets the weight of the mesh animation.
Declaration
public float Weight { get; set; }
Property Value
Type | Description |
---|---|
float |
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. |
HasTextureCoords(int)
Checks if the mesh attachment overrides a particular set of texture coordinates on the host mesh. This returns false if the list is null or empty. The index is between zero and the maximum number of texture coordinate channels.
Declaration
public bool HasTextureCoords(int channelIndex)
Parameters
Type | Name | Description |
---|---|---|
int | channelIndex | Channel index |
Returns
Type | Description |
---|---|
bool | True if texture coordinates are present in the channel. |
HasVertexColors(int)
Checks if the mesh attachment overrides a particular set of vertex colors on the host mesh. This returns false if the list is null or empty. The index is between zero and the maximumb number of vertex color channels.
Declaration
public bool HasVertexColors(int channelIndex)
Parameters
Type | Name | Description |
---|---|---|
int | channelIndex | Channel index |
Returns
Type | Description |
---|---|
bool | True if vertex colors are present in the channel. |