GltfMesh
GLTFMesh represents a glTF mesh.
GLTFMesh represents a glTF mesh.
GLTFMesh handles 3D mesh data imported from glTF files. It includes properties for blend channels, blend weights, instance materials, and the mesh itself.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
GltfMeshConstructor
public GltfMesh();Properties4
BlendWeightsProperty
public float[] BlendWeights { get; set; }An array of floats representing the blend weights of the mesh.
InstanceMaterialsProperty
public Reckfell.Collections.Array<Material> InstanceMaterials { get; set; }An array of Material objects representing the materials used in the mesh.
MeshProperty
public ImporterMesh Mesh { get; set; }The ImporterMesh object representing the mesh itself.
OriginalNameProperty
public string OriginalName { get; set; }The original name of the mesh.
Methods11
GetAdditionalDataVariant
public Variant GetAdditionalData(StringName extensionName);Gets additional arbitrary data in this GltfMesh instance. This can be used to keep per-node state data in GltfDocumentExtension classes, which is important because they are stateless.
The argument should be the GltfDocumentExtension name (does not have to match the extension name in the glTF file), and the return value can be anything you set. If nothing was set, the return value is null.
| Name | Type | Default |
|---|---|---|
extensionName | StringName | — |
VariantGetBlendWeightsfloat[]
public float[] GetBlendWeights();float[]GetInstanceMaterialsReckfell.Collections.Array<Material>
public Reckfell.Collections.Array<Material> GetInstanceMaterials();Reckfell.Collections.Array<Material>GetMeshImporterMesh
public ImporterMesh GetMesh();ImporterMeshGetOriginalNamestring
public string GetOriginalName();stringSetAdditionalDatavoid
public void SetAdditionalData(StringName extensionName, Variant additionalData);Sets additional arbitrary data in this GltfMesh instance. This can be used to keep per-node state data in GltfDocumentExtension classes, which is important because they are stateless.
The first argument should be the GltfDocumentExtension name (does not have to match the extension name in the glTF file), and the second argument can be anything you want.
| Name | Type | Default |
|---|---|---|
extensionName | StringName | — |
additionalData | Variant | — |
SetBlendWeights2 overloads
public void SetBlendWeights(ReadOnlySpan<float> blendWeights);| Name | Type | Default |
|---|---|---|
blendWeights | ReadOnlySpan<float> | — |
public void SetBlendWeights(float[] blendWeights);| Name | Type | Default |
|---|---|---|
blendWeights | float[] | — |
SetInstanceMaterialsvoid
public void SetInstanceMaterials(Reckfell.Collections.Array<Material> instanceMaterials);| Name | Type | Default |
|---|---|---|
instanceMaterials | Reckfell.Collections.Array<Material> | — |
SetMeshvoid
public void SetMesh(ImporterMesh mesh);| Name | Type | Default |
|---|---|---|
mesh | ImporterMesh | — |
SetOriginalNamevoid
public void SetOriginalName(string originalName);| Name | Type | Default |
|---|---|---|
originalName | string | — |