Class Root
The root object for a glTF asset. https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#reference-gltf
Inherited Members
Namespace: GLTFast.Schema
Syntax
[Serializable]
public class Root
Fields
accessors
An array of accessors. An accessor is a typed view into a bufferView.
Declaration
public Accessor[] accessors
Field Value
Type | Description |
---|---|
Accessor[] |
animations
An array of keyframe animations.
Declaration
public GltfAnimation[] animations
Field Value
Type | Description |
---|---|
GltfAnimation[] |
asset
Metadata about the glTF asset.
Declaration
public Asset asset
Field Value
Type | Description |
---|---|
Asset |
buffers
An array of buffers. A buffer points to binary geometry, animation, or skins.
Declaration
public Buffer[] buffers
Field Value
Type | Description |
---|---|
Buffer[] |
bufferViews
An array of bufferViews. A bufferView is a view into a buffer generally representing a subset of the buffer.
Declaration
public BufferView[] bufferViews
Field Value
Type | Description |
---|---|
BufferView[] |
cameras
An array of cameras. A camera defines a projection matrix.
Declaration
public Camera[] cameras
Field Value
Type | Description |
---|---|
Camera[] |
extensions
Declaration
public RootExtension extensions
Field Value
Type | Description |
---|---|
RootExtension |
extensionsRequired
Names of glTF extensions required to properly load this asset.
Declaration
public string[] extensionsRequired
Field Value
Type | Description |
---|---|
String[] |
extensionsUsed
Names of glTF extensions used somewhere in this asset.
Declaration
public string[] extensionsUsed
Field Value
Type | Description |
---|---|
String[] |
images
An array of images. An image defines data used to create a texture.
Declaration
public Image[] images
Field Value
Type | Description |
---|---|
Image[] |
materials
An array of materials. A material defines the appearance of a primitive.
Declaration
public Material[] materials
Field Value
Type | Description |
---|---|
Material[] |
meshes
An array of meshes. A mesh is a set of primitives to be rendered.
Declaration
public Mesh[] meshes
Field Value
Type | Description |
---|---|
Mesh[] |
nodes
An array of nodes.
Declaration
public Node[] nodes
Field Value
Type | Description |
---|---|
Node[] |
samplers
An array of samplers. A sampler contains properties for texture filtering and wrapping modes.
Declaration
public Sampler[] samplers
Field Value
Type | Description |
---|---|
Sampler[] |
scene
The index of the default scene.
Declaration
public int scene
Field Value
Type | Description |
---|---|
Int32 |
scenes
An array of scenes.
Declaration
public Scene[] scenes
Field Value
Type | Description |
---|---|
Scene[] |
skins
An array of skins. A skin is defined by joints and matrices.
Declaration
public Skin[] skins
Field Value
Type | Description |
---|---|
Skin[] |
textures
An array of textures.
Declaration
public Texture[] textures
Field Value
Type | Description |
---|---|
Texture[] |
Properties
HasAnimation
Declaration
public bool HasAnimation { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
GltfSerialize(StreamWriter)
Serialization to JSON
Declaration
public void GltfSerialize(StreamWriter stream)
Parameters
Type | Name | Description |
---|---|---|
StreamWriter | stream | Stream the JSON string is being written to. |
IsAccessorInterleaved(Int32)
Looks up if a certain accessor points to interleaved data.
Declaration
public bool IsAccessorInterleaved(int accessorIndex)
Parameters
Type | Name | Description |
---|---|---|
Int32 | accessorIndex | Accessor index |
Returns
Type | Description |
---|---|
Boolean | True if accessor is interleaved, false if its data is continuous. |