//------------------------------------------------------------------------------
//
// 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
/// A set of primitives to be rendered. Its global transform is defined by a node that references it.
///
public partial class Mesh {
///
/// Backing field for Primitives.
///
private MeshPrimitive[] m_primitives;
///
/// Backing field for Weights.
///
private float[] m_weights;
///
/// 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;
///
/// An array of primitives, each defining geometry to be rendered.
///
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("primitives")]
public MeshPrimitive[] Primitives {
get {
return this.m_primitives;
}
set {
if ((value == null)) {
this.m_primitives = value;
return;
}
if ((value.Length < 1u)) {
throw new System.ArgumentException("Array not long enough");
}
this.m_primitives = value;
}
}
///
/// Array of weights to be applied to the morph targets. The number of array elements **MUST** match the number of morph targets.
///
[System.Text.Json.Serialization.JsonPropertyNameAttribute("weights")]
public float[] Weights {
get {
return this.m_weights;
}
set {
if ((value == null)) {
this.m_weights = value;
return;
}
if ((value.Length < 1u)) {
throw new System.ArgumentException("Array not long enough");
}
this.m_weights = 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 Primitives property should be serialized.
///
public bool ShouldSerializePrimitives() {
return ((m_primitives == null)
== false);
}
///
/// This method is used to determine if the Weights property should be serialized.
///
public bool ShouldSerializeWeights() {
return ((m_weights == 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);
}
}
}