//------------------------------------------------------------------------------
//
// 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
/// Joints and matrices defining a skin.
///
public partial class Skin {
///
/// Backing field for InverseBindMatrices.
///
private System.Nullable m_inverseBindMatrices;
///
/// Backing field for Skeleton.
///
private System.Nullable m_skeleton;
///
/// Backing field for Joints.
///
private int[] m_joints;
///
/// Backing field for Name.
///
private string m_name;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The index of the accessor containing the floating-point 4x4 inverse-bind matrices.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("inverseBindMatrices")]
public System.Nullable InverseBindMatrices {
get {
return this.m_inverseBindMatrices;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("InverseBindMatrices", value, "Expected value to be greater than or equal to 0");
}
this.m_inverseBindMatrices = value;
}
}
///
/// The index of the node used as a skeleton root.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("skeleton")]
public System.Nullable Skeleton {
get {
return this.m_skeleton;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("Skeleton", value, "Expected value to be greater than or equal to 0");
}
this.m_skeleton = value;
}
}
///
/// Indices of skeleton nodes, used as joints in this skin.
///
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("joints")]
public int[] Joints {
get {
return this.m_joints;
}
set {
if ((value == null)) {
this.m_joints = value;
return;
}
if ((value.Length < 1u)) {
throw new System.ArgumentException("Array not long enough");
}
int index = 0;
for (index = 0; (index < value.Length); index = (index + 1)) {
if ((value[index] < 0)) {
throw new System.ArgumentOutOfRangeException();
}
}
this.m_joints = value;
}
}
///
/// The user-defined name of this object.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("name")]
public string Name {
get {
return this.m_name;
}
set {
this.m_name = 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 InverseBindMatrices property should be serialized.
///
public bool ShouldSerializeInverseBindMatrices() {
return ((m_inverseBindMatrices == null)
== false);
}
///
/// This method is used to determine if the Skeleton property should be serialized.
///
public bool ShouldSerializeSkeleton() {
return ((m_skeleton == null)
== false);
}
///
/// This method is used to determine if the Joints property should be serialized.
///
public bool ShouldSerializeJoints() {
return ((m_joints == null)
== false);
}
///
/// This method is used to determine if the Name property should be serialized.
///
public bool ShouldSerializeName() {
return ((m_name == 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);
}
}
}