Class RootBase
The root object for a glTF asset.
Inherited Members
Namespace: GLTFast.Schema
Assembly: solution.dll
Syntax
[Serializable]
public abstract class RootBase
Fields
extensionsRequired
Names of glTF extensions required to properly load this asset.
Declaration
public string[] extensionsRequired
Field Value
Type | Description |
---|---|
string[] |
See Also
extensionsUsed
Names of glTF extensions used somewhere in this asset.
Declaration
public string[] extensionsUsed
Field Value
Type | Description |
---|---|
string[] |
See Also
scene
The index of the default scene.
Declaration
public int scene
Field Value
Type | Description |
---|---|
int |
See Also
Properties
Accessors
An array of accessors. An accessor is a typed view into a bufferView.
Declaration
public abstract IReadOnlyList<AccessorBase> Accessors { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<AccessorBase> |
See Also
Animations
An array of keyframe animations.
Declaration
public abstract IReadOnlyList<AnimationBase> Animations { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<AnimationBase> |
See Also
Asset
Metadata about the glTF asset.
Declaration
public abstract Asset Asset { get; }
Property Value
Type | Description |
---|---|
Asset |
See Also
BufferViews
An array of bufferViews. A bufferView is a view into a buffer generally representing a subset of the buffer.
Declaration
public abstract IReadOnlyList<BufferViewBase> BufferViews { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<BufferViewBase> |
See Also
Buffers
An array of buffers. A buffer points to binary geometry, animation, or skins.
Declaration
public abstract IReadOnlyList<Buffer> Buffers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Buffer> |
See Also
Cameras
An array of cameras. A camera defines a projection matrix.
Declaration
public abstract IReadOnlyList<CameraBase> Cameras { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<CameraBase> |
See Also
Extensions
glTF root extensions
Declaration
public abstract RootExtensions Extensions { get; }
Property Value
Type | Description |
---|---|
RootExtensions |
See Also
HasAnimation
Declaration
public bool HasAnimation { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
Images
An array of images. An image defines data used to create a texture.
Declaration
public abstract IReadOnlyList<Image> Images { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Image> |
See Also
Materials
An array of materials. A material defines the appearance of a primitive.
Declaration
public abstract IReadOnlyList<MaterialBase> Materials { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<MaterialBase> |
See Also
Meshes
An array of meshes. A mesh is a set of primitives to be rendered.
Declaration
public abstract IReadOnlyList<MeshBase> Meshes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<MeshBase> |
See Also
Nodes
An array of nodes.
Declaration
public abstract IReadOnlyList<NodeBase> Nodes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<NodeBase> |
See Also
Samplers
An array of samplers. A sampler contains properties for texture filtering and wrapping modes.
Declaration
public abstract IReadOnlyList<Sampler> Samplers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Sampler> |
See Also
Scenes
An array of scenes.
Declaration
public abstract IReadOnlyList<Scene> Scenes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Scene> |
See Also
Skins
An array of skins. A skin is defined by joints and matrices.
Declaration
public abstract IReadOnlyList<Skin> Skins { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<Skin> |
See Also
Textures
An array of textures.
Declaration
public abstract IReadOnlyList<TextureBase> Textures { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<TextureBase> |
See Also
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. |
See Also
IsAccessorInterleaved(int)
Looks up if a certain accessor points to interleaved data.
Declaration
public bool IsAccessorInterleaved(int accessorIndex)
Parameters
Type | Name | Description |
---|---|---|
int | accessorIndex | Accessor index |
Returns
Type | Description |
---|---|
bool | True if accessor is interleaved, false if its data is continuous. |
See Also
JsonUtilityCleanup()
Cleans up invalid parsing artifacts created by GltfJsonUtilityParser. If you inherit a custom Root class (for use with GltfImport.LoadWithCustomSchema<T>(string,ImportSettings,System.Threading.CancellationToken) ) you can override this method to perform sanity checks on the deserialized, custom properties.
Declaration
public virtual void JsonUtilityCleanup()