//------------------------------------------------------------------------------ // // 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 /// glTF extension that defines the strength of the specular reflection. /// Sourced from the 'KHR_materials_specular' extension /// public partial class MaterialsSpecularGltfMaterialExtension { /// /// Backing field for SpecularFactor. /// private float m_specularFactor = 1F; /// /// Backing field for SpecularTexture. /// private TextureInfo m_specularTexture; /// /// Backing field for SpecularColorFactor. /// private Brutal.Numerics.float3 m_specularColorFactor = new Brutal.Numerics.float3(1F, 1F, 1F); /// /// Backing field for SpecularColorTexture. /// private TextureInfo m_specularColorTexture; /// /// Backing field for Extensions. /// private System.Collections.Generic.Dictionary m_extensions; /// /// Backing field for Extras. /// private Extras m_extras; /// /// The strength of the specular reflection. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularFactor")] public float SpecularFactor { get { return this.m_specularFactor; } set { if ((value < 0D)) { throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be greater than or equal to 0"); } if ((value > 1D)) { throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be less than or equal to 1"); } this.m_specularFactor = value; } } /// /// A texture that defines the specular factor in the alpha channel. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularTexture")] public TextureInfo SpecularTexture { get { return this.m_specularTexture; } set { this.m_specularTexture = value; } } /// /// The F0 RGB color of the specular reflection. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorFactor")] public Brutal.Numerics.float3 SpecularColorFactor { get { return this.m_specularColorFactor; } set { this.m_specularColorFactor = value; } } /// /// A texture that defines the F0 color of the specular reflection. /// [System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorTexture")] public TextureInfo SpecularColorTexture { get { return this.m_specularColorTexture; } set { this.m_specularColorTexture = 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 SpecularFactor property should be serialized. /// public bool ShouldSerializeSpecularFactor() { return ((m_specularFactor == 1F) == false); } /// /// This method is used to determine if the SpecularTexture property should be serialized. /// public bool ShouldSerializeSpecularTexture() { return ((m_specularTexture == null) == false); } /// /// This method is used to determine if the SpecularColorFactor property should be serialized. /// public bool ShouldSerializeSpecularColorFactor() { return ((m_specularColorFactor == new Brutal.Numerics.float3(1F, 1F, 1F)) == false); } /// /// This method is used to determine if the SpecularColorTexture property should be serialized. /// public bool ShouldSerializeSpecularColorTexture() { return ((m_specularColorTexture == 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); } } }