mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
185 lines
6.4 KiB
C#
185 lines
6.4 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace Brutal.GltfApi {
|
|
using System.Linq;
|
|
using System.Runtime.Serialization;
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
/// <summary>
|
|
/// 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
|
|
/// </summary>
|
|
public partial class MaterialsVolumeGltfMaterialExtension {
|
|
|
|
/// <summary>
|
|
/// Backing field for ThicknessFactor.
|
|
/// </summary>
|
|
private float m_thicknessFactor = 0F;
|
|
|
|
/// <summary>
|
|
/// Backing field for ThicknessTexture.
|
|
/// </summary>
|
|
private TextureInfo m_thicknessTexture;
|
|
|
|
/// <summary>
|
|
/// Backing field for AttenuationDistance.
|
|
/// </summary>
|
|
private System.Nullable<float> m_attenuationDistance;
|
|
|
|
/// <summary>
|
|
/// Backing field for AttenuationColor.
|
|
/// </summary>
|
|
private Brutal.Numerics.float3 m_attenuationColor = new Brutal.Numerics.float3(1F, 1F, 1F);
|
|
|
|
/// <summary>
|
|
/// Backing field for Extensions.
|
|
/// </summary>
|
|
private System.Collections.Generic.Dictionary<string, object> m_extensions;
|
|
|
|
/// <summary>
|
|
/// Backing field for Extras.
|
|
/// </summary>
|
|
private Extras m_extras;
|
|
|
|
/// <summary>
|
|
/// Thickness of the volume.
|
|
/// </summary>
|
|
[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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Texture that defines the thickness of the volume, stored in the G channel.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("thicknessTexture")]
|
|
public TextureInfo ThicknessTexture {
|
|
get {
|
|
return this.m_thicknessTexture;
|
|
}
|
|
set {
|
|
this.m_thicknessTexture = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Average distance that light travels in the medium before interacting with a particle.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationDistance")]
|
|
public System.Nullable<float> 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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Color that white light turns into due to absorption when reaching the attenuation distance.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("attenuationColor")]
|
|
public Brutal.Numerics.float3 AttenuationColor {
|
|
get {
|
|
return this.m_attenuationColor;
|
|
}
|
|
set {
|
|
this.m_attenuationColor = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// JSON object with extension-specific objects.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extensions")]
|
|
public System.Collections.Generic.Dictionary<string, object> Extensions {
|
|
get {
|
|
return this.m_extensions;
|
|
}
|
|
set {
|
|
this.m_extensions = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Application-specific data.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("extras")]
|
|
public Extras Extras {
|
|
get {
|
|
return this.m_extras;
|
|
}
|
|
set {
|
|
this.m_extras = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the ThicknessFactor property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeThicknessFactor() {
|
|
return ((m_thicknessFactor == 0F)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the ThicknessTexture property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeThicknessTexture() {
|
|
return ((m_thicknessTexture == null)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the AttenuationDistance property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeAttenuationDistance() {
|
|
return ((m_attenuationDistance == null)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the AttenuationColor property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeAttenuationColor() {
|
|
return ((m_attenuationColor == new Brutal.Numerics.float3(1F, 1F, 1F))
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the Extensions property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeExtensions() {
|
|
return ((m_extensions == null)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the Extras property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeExtras() {
|
|
return ((m_extras == null)
|
|
== false);
|
|
}
|
|
}
|
|
}
|