//------------------------------------------------------------------------------
//
// 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 optical transmission of a material.
/// Sourced from the 'KHR_materials_transmission' extension
///
public partial class MaterialsTransmissionGltfMaterialExtension {
///
/// Backing field for TransmissionFactor.
///
private float m_transmissionFactor = 0F;
///
/// Backing field for TransmissionTexture.
///
private TextureInfo m_transmissionTexture;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The base percentage of light transmitted through the surface.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("transmissionFactor")]
public float TransmissionFactor {
get {
return this.m_transmissionFactor;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("TransmissionFactor", value, "Expected value to be greater than or equal to 0");
}
if ((value > 1D)) {
throw new System.ArgumentOutOfRangeException("TransmissionFactor", value, "Expected value to be less than or equal to 1");
}
this.m_transmissionFactor = value;
}
}
///
/// A texture that defines the transmission percentage of the surface, sampled from the R channel. These values are linear, and will be multiplied by transmissionFactor.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("transmissionTexture")]
public TextureInfo TransmissionTexture {
get {
return this.m_transmissionTexture;
}
set {
this.m_transmissionTexture = 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 TransmissionFactor property should be serialized.
///
public bool ShouldSerializeTransmissionFactor() {
return ((m_transmissionFactor == 0F)
== false);
}
///
/// This method is used to determine if the TransmissionTexture property should be serialized.
///
public bool ShouldSerializeTransmissionTexture() {
return ((m_transmissionTexture == 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);
}
}
}