//------------------------------------------------------------------------------
//
// 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 parameters for the volume of a material.
/// Sourced from the 'KHR_materials_volume' extension
///
public partial class MaterialsVolumeGltfMaterialExtension {
///
/// Backing field for ThicknessFactor.
///
private float m_thicknessFactor = 0F;
///
/// Backing field for ThicknessTexture.
///
private TextureInfo m_thicknessTexture;
///
/// Backing field for AttenuationDistance.
///
private System.Nullable m_attenuationDistance;
///
/// Backing field for AttenuationColor.
///
private Brutal.Numerics.float3 m_attenuationColor = new Brutal.Numerics.float3(1F, 1F, 1F);
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// Thickness of the volume.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("thicknessFactor")]
public float ThicknessFactor {
get {
return this.m_thicknessFactor;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("ThicknessFactor", value, "Expected value to be greater than or equal to 0");
}
this.m_thicknessFactor = value;
}
}
///
/// Texture that defines the thickness of the volume, stored in the G channel.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("thicknessTexture")]
public TextureInfo ThicknessTexture {
get {
return this.m_thicknessTexture;
}
set {
this.m_thicknessTexture = value;
}
}
///
/// Average distance that light travels in the medium before interacting with a particle.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationDistance")]
public System.Nullable AttenuationDistance {
get {
return this.m_attenuationDistance;
}
set {
if ((value <= 0D)) {
throw new System.ArgumentOutOfRangeException("AttenuationDistance", value, "Expected value to be greater than 0");
}
this.m_attenuationDistance = value;
}
}
///
/// Color that white light turns into due to absorption when reaching the attenuation distance.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationColor")]
public Brutal.Numerics.float3 AttenuationColor {
get {
return this.m_attenuationColor;
}
set {
this.m_attenuationColor = 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 ThicknessFactor property should be serialized.
///
public bool ShouldSerializeThicknessFactor() {
return ((m_thicknessFactor == 0F)
== false);
}
///
/// This method is used to determine if the ThicknessTexture property should be serialized.
///
public bool ShouldSerializeThicknessTexture() {
return ((m_thicknessTexture == null)
== false);
}
///
/// This method is used to determine if the AttenuationDistance property should be serialized.
///
public bool ShouldSerializeAttenuationDistance() {
return ((m_attenuationDistance == null)
== false);
}
///
/// This method is used to determine if the AttenuationColor property should be serialized.
///
public bool ShouldSerializeAttenuationColor() {
return ((m_attenuationColor == new Brutal.Numerics.float3(1F, 1F, 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);
}
}
}