MeshAttributeSemanticExtensions
- Namespace: Turian.Engine.Core
- Source File: MeshAttributeSemanticExtensions.cs
Converts between MeshAttributeSemantic and glTF 2.0 attribute names.
Public Methods
ToGltfName
public static string ToGltfName(MeshAttributeSemantic semantic)
Returns the glTF 2.0 attribute name for semantic.
Parameters:
semantic(MeshAttributeSemantic)
Returns: string
TryFromGltfName
public static bool TryFromGltfName(string gltfName, MeshAttributeSemantic semantic)
Resolves a glTF 2.0 attribute name to its MeshAttributeSemantic.
Parameters:
gltfName(string): The glTF attribute name, for exampleTEXCOORD_0.semantic(MeshAttributeSemantic): The resolved semantic when the name is known.
Returns: bool
truewhen the name maps to a semantic; otherwisefalse.
ToGltfAccessorType
public static string ToGltfAccessorType(uint componentCount)
Returns the glTF 2.0 accessor type string for a component count.
Parameters:
componentCount(uint): Number of components per element (1 to 4).
Returns: string