//------------------------------------------------------------------------------
//
// 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 adjusts the strength of emissive material properties.
/// Sourced from the 'KHR_materials_emissive_strength' extension
///
public partial class MaterialsEmissiveStrengthGltfMaterialExtension {
///
/// Backing field for EmissiveStrength.
///
private float m_emissiveStrength = 1F;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The strength adjustment to be multiplied with the material's emissive value.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("emissiveStrength")]
public float EmissiveStrength {
get {
return this.m_emissiveStrength;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("EmissiveStrength", value, "Expected value to be greater than or equal to 0");
}
this.m_emissiveStrength = 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 EmissiveStrength property should be serialized.
///
public bool ShouldSerializeEmissiveStrength() {
return ((m_emissiveStrength == 1F)
== 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);
}
}
}