//------------------------------------------------------------------------------
//
// 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 an iridescence effect.
/// Sourced from the 'KHR_materials_iridescence' extension
///
public partial class MaterialsIridescenceGltfMaterialExtension {
///
/// Backing field for IridescenceFactor.
///
private float m_iridescenceFactor = 0F;
///
/// Backing field for IridescenceTexture.
///
private TextureInfo m_iridescenceTexture;
///
/// Backing field for IridescenceIor.
///
private float m_iridescenceIor = 1.3F;
///
/// Backing field for IridescenceThicknessMinimum.
///
private float m_iridescenceThicknessMinimum = 100F;
///
/// Backing field for IridescenceThicknessMaximum.
///
private float m_iridescenceThicknessMaximum = 400F;
///
/// Backing field for IridescenceThicknessTexture.
///
private TextureInfo m_iridescenceThicknessTexture;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The iridescence intensity factor.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceFactor")]
public float IridescenceFactor {
get {
return this.m_iridescenceFactor;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("IridescenceFactor", value, "Expected value to be greater than or equal to 0");
}
if ((value > 1D)) {
throw new System.ArgumentOutOfRangeException("IridescenceFactor", value, "Expected value to be less than or equal to 1");
}
this.m_iridescenceFactor = value;
}
}
///
/// The iridescence intensity texture.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceTexture")]
public TextureInfo IridescenceTexture {
get {
return this.m_iridescenceTexture;
}
set {
this.m_iridescenceTexture = value;
}
}
///
/// The index of refraction of the dielectric thin-film layer.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceIor")]
public float IridescenceIor {
get {
return this.m_iridescenceIor;
}
set {
if ((value < 1D)) {
throw new System.ArgumentOutOfRangeException("IridescenceIor", value, "Expected value to be greater than or equal to 1");
}
this.m_iridescenceIor = value;
}
}
///
/// The minimum thickness of the thin-film layer given in nanometers.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessMinimum")]
public float IridescenceThicknessMinimum {
get {
return this.m_iridescenceThicknessMinimum;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("IridescenceThicknessMinimum", value, "Expected value to be greater than or equal to 0");
}
this.m_iridescenceThicknessMinimum = value;
}
}
///
/// The maximum thickness of the thin-film layer given in nanometers.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessMaximum")]
public float IridescenceThicknessMaximum {
get {
return this.m_iridescenceThicknessMaximum;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("IridescenceThicknessMaximum", value, "Expected value to be greater than or equal to 0");
}
this.m_iridescenceThicknessMaximum = value;
}
}
///
/// The thickness texture of the thin-film layer.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("iridescenceThicknessTexture")]
public TextureInfo IridescenceThicknessTexture {
get {
return this.m_iridescenceThicknessTexture;
}
set {
this.m_iridescenceThicknessTexture = 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 IridescenceFactor property should be serialized.
///
public bool ShouldSerializeIridescenceFactor() {
return ((m_iridescenceFactor == 0F)
== false);
}
///
/// This method is used to determine if the IridescenceTexture property should be serialized.
///
public bool ShouldSerializeIridescenceTexture() {
return ((m_iridescenceTexture == null)
== false);
}
///
/// This method is used to determine if the IridescenceIor property should be serialized.
///
public bool ShouldSerializeIridescenceIor() {
return ((m_iridescenceIor == 1.3F)
== false);
}
///
/// This method is used to determine if the IridescenceThicknessMinimum property should be serialized.
///
public bool ShouldSerializeIridescenceThicknessMinimum() {
return ((m_iridescenceThicknessMinimum == 100F)
== false);
}
///
/// This method is used to determine if the IridescenceThicknessMaximum property should be serialized.
///
public bool ShouldSerializeIridescenceThicknessMaximum() {
return ((m_iridescenceThicknessMaximum == 400F)
== false);
}
///
/// This method is used to determine if the IridescenceThicknessTexture property should be serialized.
///
public bool ShouldSerializeIridescenceThicknessTexture() {
return ((m_iridescenceThicknessTexture == 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);
}
}
}