//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace Brutal.GltfApi { using System.Linq; using System.Runtime.Serialization; using System.Text.Json.Serialization; /// /// Object part of the GLTF file schema /// The root object for a glTF asset. /// public partial class Gltf { /// /// Backing field for ExtensionsUsed. /// private string[] m_extensionsUsed; /// /// Backing field for ExtensionsRequired. /// private string[] m_extensionsRequired; /// /// Backing field for Accessors. /// private Accessor[] m_accessors; /// /// Backing field for Animations. /// private Animation[] m_animations; /// /// Backing field for Asset. /// private Asset m_asset; /// /// Backing field for Buffers. /// private Buffer[] m_buffers; /// /// Backing field for BufferViews. /// private BufferView[] m_bufferViews; /// /// Backing field for Cameras. /// private Camera[] m_cameras; /// /// Backing field for Images. /// private Image[] m_images; /// /// Backing field for Materials. /// private Material[] m_materials; /// /// Backing field for Meshes. /// private Mesh[] m_meshes; /// /// Backing field for Nodes. /// private Node[] m_nodes; /// /// Backing field for Samplers. /// private Sampler[] m_samplers; /// /// Backing field for Scene. /// private System.Nullable m_scene; /// /// Backing field for Scenes. /// private Scene[] m_scenes; /// /// Backing field for Skins. /// private Skin[] m_skins; /// /// Backing field for Textures. /// private Texture[] m_textures; /// /// Backing field for Extensions. /// private System.Collections.Generic.Dictionary m_extensions; /// /// Backing field for Extras. /// private Extras m_extras; /// /// Names of glTF extensions used in this asset. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensionsUsed")] public string[] ExtensionsUsed { get { return this.m_extensionsUsed; } set { if ((value == null)) { this.m_extensionsUsed = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_extensionsUsed = value; } } /// /// Names of glTF extensions required to properly load this asset. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensionsRequired")] public string[] ExtensionsRequired { get { return this.m_extensionsRequired; } set { if ((value == null)) { this.m_extensionsRequired = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_extensionsRequired = value; } } /// /// An array of accessors. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("accessors")] public Accessor[] Accessors { get { return this.m_accessors; } set { if ((value == null)) { this.m_accessors = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_accessors = value; } } /// /// An array of keyframe animations. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("animations")] public Animation[] Animations { get { return this.m_animations; } set { if ((value == null)) { this.m_animations = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_animations = value; } } /// /// Metadata about the glTF asset. /// [System.Text.Json.Serialization.JsonRequiredAttribute()] [System.Text.Json.Serialization.JsonPropertyNameAttribute("asset")] public Asset Asset { get { return this.m_asset; } set { this.m_asset = value; } } /// /// An array of buffers. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("buffers")] public Buffer[] Buffers { get { return this.m_buffers; } set { if ((value == null)) { this.m_buffers = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_buffers = value; } } /// /// An array of bufferViews. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferViews")] public BufferView[] BufferViews { get { return this.m_bufferViews; } set { if ((value == null)) { this.m_bufferViews = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_bufferViews = value; } } /// /// An array of cameras. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("cameras")] public Camera[] Cameras { get { return this.m_cameras; } set { if ((value == null)) { this.m_cameras = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_cameras = value; } } /// /// An array of images. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("images")] public Image[] Images { get { return this.m_images; } set { if ((value == null)) { this.m_images = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_images = value; } } /// /// An array of materials. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("materials")] public Material[] Materials { get { return this.m_materials; } set { if ((value == null)) { this.m_materials = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_materials = value; } } /// /// An array of meshes. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("meshes")] public Mesh[] Meshes { get { return this.m_meshes; } set { if ((value == null)) { this.m_meshes = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_meshes = value; } } /// /// An array of nodes. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("nodes")] public Node[] Nodes { get { return this.m_nodes; } set { if ((value == null)) { this.m_nodes = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_nodes = value; } } /// /// An array of samplers. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("samplers")] public Sampler[] Samplers { get { return this.m_samplers; } set { if ((value == null)) { this.m_samplers = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_samplers = value; } } /// /// The index of the default scene. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("scene")] public System.Nullable Scene { get { return this.m_scene; } set { if ((value < 0)) { throw new System.ArgumentOutOfRangeException("Scene", value, "Expected value to be greater than or equal to 0"); } this.m_scene = value; } } /// /// An array of scenes. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("scenes")] public Scene[] Scenes { get { return this.m_scenes; } set { if ((value == null)) { this.m_scenes = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_scenes = value; } } /// /// An array of skins. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("skins")] public Skin[] Skins { get { return this.m_skins; } set { if ((value == null)) { this.m_skins = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_skins = value; } } /// /// An array of textures. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("textures")] public Texture[] Textures { get { return this.m_textures; } set { if ((value == null)) { this.m_textures = value; return; } if ((value.Length < 1u)) { throw new System.ArgumentException("Array not long enough"); } this.m_textures = value; } } /// /// JSON object with extension-specific objects. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")] public System.Collections.Generic.Dictionary Extensions { get { return this.m_extensions; } set { this.m_extensions = value; } } /// /// Application-specific data. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")] public Extras Extras { get { return this.m_extras; } set { this.m_extras = value; } } /// /// This method is used to determine if the ExtensionsUsed property should be serialized. /// public bool ShouldSerializeExtensionsUsed() { return ((m_extensionsUsed == null) == false); } /// /// This method is used to determine if the ExtensionsRequired property should be serialized. /// public bool ShouldSerializeExtensionsRequired() { return ((m_extensionsRequired == null) == false); } /// /// This method is used to determine if the Accessors property should be serialized. /// public bool ShouldSerializeAccessors() { return ((m_accessors == null) == false); } /// /// This method is used to determine if the Animations property should be serialized. /// public bool ShouldSerializeAnimations() { return ((m_animations == null) == false); } /// /// This method is used to determine if the Asset property should be serialized. /// public bool ShouldSerializeAsset() { return ((m_asset == null) == false); } /// /// This method is used to determine if the Buffers property should be serialized. /// public bool ShouldSerializeBuffers() { return ((m_buffers == null) == false); } /// /// This method is used to determine if the BufferViews property should be serialized. /// public bool ShouldSerializeBufferViews() { return ((m_bufferViews == null) == false); } /// /// This method is used to determine if the Cameras property should be serialized. /// public bool ShouldSerializeCameras() { return ((m_cameras == null) == false); } /// /// This method is used to determine if the Images property should be serialized. /// public bool ShouldSerializeImages() { return ((m_images == null) == false); } /// /// This method is used to determine if the Materials property should be serialized. /// public bool ShouldSerializeMaterials() { return ((m_materials == null) == false); } /// /// This method is used to determine if the Meshes property should be serialized. /// public bool ShouldSerializeMeshes() { return ((m_meshes == null) == false); } /// /// This method is used to determine if the Nodes property should be serialized. /// public bool ShouldSerializeNodes() { return ((m_nodes == null) == false); } /// /// This method is used to determine if the Samplers property should be serialized. /// public bool ShouldSerializeSamplers() { return ((m_samplers == null) == false); } /// /// This method is used to determine if the Scene property should be serialized. /// public bool ShouldSerializeScene() { return ((m_scene == null) == false); } /// /// This method is used to determine if the Scenes property should be serialized. /// public bool ShouldSerializeScenes() { return ((m_scenes == null) == false); } /// /// This method is used to determine if the Skins property should be serialized. /// public bool ShouldSerializeSkins() { return ((m_skins == null) == false); } /// /// This method is used to determine if the Textures property should be serialized. /// public bool ShouldSerializeTextures() { return ((m_textures == null) == false); } /// /// This method is used to determine if the Extensions property should be serialized. /// public bool ShouldSerializeExtensions() { return ((m_extensions == null) == false); } /// /// This method is used to determine if the Extras property should be serialized. /// public bool ShouldSerializeExtras() { return ((m_extras == null) == false); } } }