//------------------------------------------------------------------------------ // // 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 /// A view into a buffer generally representing a subset of the buffer. /// public partial class BufferView { /// /// Backing field for Buffer. /// private int m_buffer; /// /// Backing field for ByteOffset. /// private int m_byteOffset = 0; /// /// Backing field for ByteLength. /// private int m_byteLength; /// /// Backing field for ByteStride. /// private System.Nullable m_byteStride; /// /// Backing field for Target. /// private System.Nullable m_target; /// /// Backing field for Name. /// private string m_name; /// /// Backing field for Extensions. /// private System.Collections.Generic.Dictionary m_extensions; /// /// Backing field for Extras. /// private Extras m_extras; /// /// The index of the buffer. /// [System.Text.Json.Serialization.JsonRequiredAttribute()] [System.Text.Json.Serialization.JsonPropertyNameAttribute("buffer")] public int Buffer { get { return this.m_buffer; } set { if ((value < 0)) { throw new System.ArgumentOutOfRangeException("Buffer", value, "Expected value to be greater than or equal to 0"); } this.m_buffer = value; } } /// /// The offset into the buffer in bytes. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")] public int ByteOffset { get { return this.m_byteOffset; } set { if ((value < 0)) { throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0"); } this.m_byteOffset = value; } } /// /// The length of the bufferView in bytes. /// [System.Text.Json.Serialization.JsonRequiredAttribute()] [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteLength")] public int ByteLength { get { return this.m_byteLength; } set { if ((value < 1)) { throw new System.ArgumentOutOfRangeException("ByteLength", value, "Expected value to be greater than or equal to 1"); } this.m_byteLength = value; } } /// /// The stride, in bytes. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("byteStride")] public System.Nullable ByteStride { get { return this.m_byteStride; } set { if ((value < 4)) { throw new System.ArgumentOutOfRangeException("ByteStride", value, "Expected value to be greater than or equal to 4"); } if ((value > 252)) { throw new System.ArgumentOutOfRangeException("ByteStride", value, "Expected value to be less than or equal to 252"); } this.m_byteStride = value; } } /// /// The hint representing the intended GPU buffer type to use with this buffer view. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("target")] public System.Nullable Target { get { return this.m_target; } set { this.m_target = value; } } /// /// The user-defined name of this object. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("name")] public string Name { get { return this.m_name; } set { this.m_name = 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 ByteOffset property should be serialized. /// public bool ShouldSerializeByteOffset() { return ((m_byteOffset == 0) == false); } /// /// This method is used to determine if the ByteStride property should be serialized. /// public bool ShouldSerializeByteStride() { return ((m_byteStride == null) == false); } /// /// This method is used to determine if the Target property should be serialized. /// public bool ShouldSerializeTarget() { return ((m_target == null) == false); } /// /// This method is used to determine if the Name property should be serialized. /// public bool ShouldSerializeName() { return ((m_name == 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); } /// /// Enum part of the GLTF file schema /// The hint representing the intended GPU buffer type to use with this buffer view. /// public enum TargetEnum { ArrayBuffer = 34962, ElementArrayBuffer = 34963, } } }