//------------------------------------------------------------------------------ // // 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 perspective camera containing properties to create a perspective projection matrix. /// public partial class CameraPerspective { /// /// Backing field for AspectRatio. /// private System.Nullable m_aspectRatio; /// /// Backing field for Yfov. /// private float m_yfov; /// /// Backing field for Zfar. /// private System.Nullable m_zfar; /// /// Backing field for Znear. /// private float m_znear; /// /// Backing field for Extensions. /// private System.Collections.Generic.Dictionary m_extensions; /// /// Backing field for Extras. /// private Extras m_extras; /// /// The floating-point aspect ratio of the field of view. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("aspectRatio")] public System.Nullable AspectRatio { get { return this.m_aspectRatio; } set { if ((value <= 0D)) { throw new System.ArgumentOutOfRangeException("AspectRatio", value, "Expected value to be greater than 0"); } this.m_aspectRatio = value; } } /// /// The floating-point vertical field of view in radians. This value **SHOULD** be less than π. /// [System.Text.Json.Serialization.JsonRequiredAttribute()] [System.Text.Json.Serialization.JsonPropertyNameAttribute("yfov")] public float Yfov { get { return this.m_yfov; } set { if ((value <= 0D)) { throw new System.ArgumentOutOfRangeException("Yfov", value, "Expected value to be greater than 0"); } this.m_yfov = value; } } /// /// The floating-point distance to the far clipping plane. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("zfar")] public System.Nullable Zfar { get { return this.m_zfar; } set { if ((value <= 0D)) { throw new System.ArgumentOutOfRangeException("Zfar", value, "Expected value to be greater than 0"); } this.m_zfar = value; } } /// /// The floating-point distance to the near clipping plane. /// [System.Text.Json.Serialization.JsonRequiredAttribute()] [System.Text.Json.Serialization.JsonPropertyNameAttribute("znear")] public float Znear { get { return this.m_znear; } set { if ((value <= 0D)) { throw new System.ArgumentOutOfRangeException("Znear", value, "Expected value to be greater than 0"); } this.m_znear = 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 AspectRatio property should be serialized. /// public bool ShouldSerializeAspectRatio() { return ((m_aspectRatio == null) == false); } /// /// This method is used to determine if the Zfar property should be serialized. /// public bool ShouldSerializeZfar() { return ((m_zfar == 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); } } }