mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
185 lines
6.3 KiB
C#
185 lines
6.3 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 strength of the specular reflection.
|
|
/// Sourced from the 'KHR_materials_specular' extension
|
|
/// </summary>
|
|
public partial class MaterialsSpecularGltfMaterialExtension {
|
|
|
|
/// <summary>
|
|
/// Backing field for SpecularFactor.
|
|
/// </summary>
|
|
private float m_specularFactor = 1F;
|
|
|
|
/// <summary>
|
|
/// Backing field for SpecularTexture.
|
|
/// </summary>
|
|
private TextureInfo m_specularTexture;
|
|
|
|
/// <summary>
|
|
/// Backing field for SpecularColorFactor.
|
|
/// </summary>
|
|
private Brutal.Numerics.float3 m_specularColorFactor = new Brutal.Numerics.float3(1F, 1F, 1F);
|
|
|
|
/// <summary>
|
|
/// Backing field for SpecularColorTexture.
|
|
/// </summary>
|
|
private TextureInfo m_specularColorTexture;
|
|
|
|
/// <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>
|
|
/// The strength of the specular reflection.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("specularFactor")]
|
|
public float SpecularFactor {
|
|
get {
|
|
return this.m_specularFactor;
|
|
}
|
|
set {
|
|
if ((value < 0D)) {
|
|
throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be greater than or equal to 0");
|
|
}
|
|
if ((value > 1D)) {
|
|
throw new System.ArgumentOutOfRangeException("SpecularFactor", value, "Expected value to be less than or equal to 1");
|
|
}
|
|
this.m_specularFactor = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A texture that defines the specular factor in the alpha channel.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("specularTexture")]
|
|
public TextureInfo SpecularTexture {
|
|
get {
|
|
return this.m_specularTexture;
|
|
}
|
|
set {
|
|
this.m_specularTexture = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// The F0 RGB color of the specular reflection.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorFactor")]
|
|
public Brutal.Numerics.float3 SpecularColorFactor {
|
|
get {
|
|
return this.m_specularColorFactor;
|
|
}
|
|
set {
|
|
this.m_specularColorFactor = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A texture that defines the F0 color of the specular reflection.
|
|
/// </summary>
|
|
[System.Text.Json.Serialization.JsonPropertyNameAttribute("specularColorTexture")]
|
|
public TextureInfo SpecularColorTexture {
|
|
get {
|
|
return this.m_specularColorTexture;
|
|
}
|
|
set {
|
|
this.m_specularColorTexture = 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 SpecularFactor property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeSpecularFactor() {
|
|
return ((m_specularFactor == 1F)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the SpecularTexture property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeSpecularTexture() {
|
|
return ((m_specularTexture == null)
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the SpecularColorFactor property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeSpecularColorFactor() {
|
|
return ((m_specularColorFactor == new Brutal.Numerics.float3(1F, 1F, 1F))
|
|
== false);
|
|
}
|
|
|
|
/// <summary>
|
|
/// This method is used to determine if the SpecularColorTexture property should be serialized.
|
|
/// </summary>
|
|
public bool ShouldSerializeSpecularColorTexture() {
|
|
return ((m_specularColorTexture == null)
|
|
== 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);
|
|
}
|
|
}
|
|
}
|