//------------------------------------------------------------------------------
//
// 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 clearcoat material layer.
/// Sourced from the 'KHR_materials_clearcoat' extension
///
public partial class MaterialsClearcoatGltfMaterialExtension {
///
/// Backing field for ClearcoatFactor.
///
private float m_clearcoatFactor = 0F;
///
/// Backing field for ClearcoatTexture.
///
private TextureInfo m_clearcoatTexture;
///
/// Backing field for ClearcoatRoughnessFactor.
///
private float m_clearcoatRoughnessFactor = 0F;
///
/// Backing field for ClearcoatRoughnessTexture.
///
private TextureInfo m_clearcoatRoughnessTexture;
///
/// Backing field for ClearcoatNormalTexture.
///
private MaterialNormalTextureInfo m_clearcoatNormalTexture;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The clearcoat layer intensity.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatFactor")]
public float ClearcoatFactor {
get {
return this.m_clearcoatFactor;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("ClearcoatFactor", value, "Expected value to be greater than or equal to 0");
}
if ((value > 1D)) {
throw new System.ArgumentOutOfRangeException("ClearcoatFactor", value, "Expected value to be less than or equal to 1");
}
this.m_clearcoatFactor = value;
}
}
///
/// The clearcoat layer intensity texture.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatTexture")]
public TextureInfo ClearcoatTexture {
get {
return this.m_clearcoatTexture;
}
set {
this.m_clearcoatTexture = value;
}
}
///
/// The clearcoat layer roughness.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatRoughnessFactor")]
public float ClearcoatRoughnessFactor {
get {
return this.m_clearcoatRoughnessFactor;
}
set {
if ((value < 0D)) {
throw new System.ArgumentOutOfRangeException("ClearcoatRoughnessFactor", value, "Expected value to be greater than or equal to 0");
}
if ((value > 1D)) {
throw new System.ArgumentOutOfRangeException("ClearcoatRoughnessFactor", value, "Expected value to be less than or equal to 1");
}
this.m_clearcoatRoughnessFactor = value;
}
}
///
/// The clearcoat layer roughness texture.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatRoughnessTexture")]
public TextureInfo ClearcoatRoughnessTexture {
get {
return this.m_clearcoatRoughnessTexture;
}
set {
this.m_clearcoatRoughnessTexture = value;
}
}
///
/// The clearcoat normal map texture.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("clearcoatNormalTexture")]
public MaterialNormalTextureInfo ClearcoatNormalTexture {
get {
return this.m_clearcoatNormalTexture;
}
set {
this.m_clearcoatNormalTexture = 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 ClearcoatFactor property should be serialized.
///
public bool ShouldSerializeClearcoatFactor() {
return ((m_clearcoatFactor == 0F)
== false);
}
///
/// This method is used to determine if the ClearcoatTexture property should be serialized.
///
public bool ShouldSerializeClearcoatTexture() {
return ((m_clearcoatTexture == null)
== false);
}
///
/// This method is used to determine if the ClearcoatRoughnessFactor property should be serialized.
///
public bool ShouldSerializeClearcoatRoughnessFactor() {
return ((m_clearcoatRoughnessFactor == 0F)
== false);
}
///
/// This method is used to determine if the ClearcoatRoughnessTexture property should be serialized.
///
public bool ShouldSerializeClearcoatRoughnessTexture() {
return ((m_clearcoatRoughnessTexture == null)
== false);
}
///
/// This method is used to determine if the ClearcoatNormalTexture property should be serialized.
///
public bool ShouldSerializeClearcoatNormalTexture() {
return ((m_clearcoatNormalTexture == 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);
}
}
}