//------------------------------------------------------------------------------
//
// 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
/// An animation sampler combines timestamps with a sequence of output values and defines an interpolation algorithm.
///
public partial class AnimationSampler {
///
/// Backing field for Input.
///
private int m_input;
///
/// Backing field for Interpolation.
///
private InterpolationEnum m_interpolation = InterpolationEnum.Linear;
///
/// Backing field for Output.
///
private int m_output;
///
/// Backing field for Extensions.
///
private System.Collections.Generic.Dictionary m_extensions;
///
/// Backing field for Extras.
///
private Extras m_extras;
///
/// The index of an accessor containing keyframe timestamps.
///
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("input")]
public int Input {
get {
return this.m_input;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("Input", value, "Expected value to be greater than or equal to 0");
}
this.m_input = value;
}
}
///
/// Interpolation algorithm.
///
[System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("interpolation")]
public InterpolationEnum Interpolation {
get {
return this.m_interpolation;
}
set {
this.m_interpolation = value;
}
}
///
/// The index of an accessor, containing keyframe output values.
///
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("output")]
public int Output {
get {
return this.m_output;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("Output", value, "Expected value to be greater than or equal to 0");
}
this.m_output = 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 Interpolation property should be serialized.
///
public bool ShouldSerializeInterpolation() {
return ((m_interpolation == InterpolationEnum.Linear)
== 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);
}
///
/// Enum part of the GLTF file schema
/// Interpolation algorithm.
///
public enum InterpolationEnum {
Linear,
Step,
Cubicspline,
}
}
}