Class GltfMeshPrimitive
Geometry to be rendered with the given material. https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/mesh.primitive.schema.json
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit.Utilities.Gltf.Schema
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class GltfMeshPrimitive : GltfProperty
Fields
indices
The index of the accessor that contains mesh indices.
When this is not defined, the primitives should be rendered without indices
using drawArrays()
. When defined, the accessor must contain indices:
the bufferView
referenced by the accessor must have a target
equal
to 34963 (ELEMENT_ARRAY_BUFFER); a byteStride
that is tightly packed,
i.e., 0 or the byte size of componentType
in bytes;
componentType
must be 5121 (UNSIGNED_BYTE), 5123 (UNSIGNED_SHORT)
or 5125 (UNSIGNED_INT), the latter is only allowed
when OES_element_index_uint
extension is used; type
must be \"SCALAR\"
.
Declaration
public int indices
Field Value
Type | Description |
---|---|
Int32 |
material
The index of the material to apply to this primitive when rendering.
Declaration
public int material
Field Value
Type | Description |
---|---|
Int32 |
mode
The type of primitives to render. All valid values correspond to WebGL enums.
Declaration
public GltfDrawMode mode
Field Value
Type | Description |
---|---|
GltfDrawMode |
Properties
Attributes
A dictionary object, where each key corresponds to mesh attribute semantic and each value is the index of the accessor containing attribute's data.
Declaration
public GltfMeshPrimitiveAttributes Attributes { get; }
Property Value
Type | Description |
---|---|
GltfMeshPrimitiveAttributes |
SubMesh
Unity Mesh wrapper for the GltfMeshPrimitive SubMesh
Declaration
public Mesh SubMesh { get; }
Property Value
Type | Description |
---|---|
Mesh |
Targets
An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only "POSITION" and "NORMAL" supported) to their deviations in the Morph Target (index of the accessor containing the attribute displacements' data).
Declaration
public List<Dictionary<string, int>> Targets { get; }
Property Value
Type | Description |
---|---|
List<Dictionary<String, Int32>> |