brutal/Brutal.Gltf/GltfApi/GeneratedSchema/Accessor.gen.cs
BRUTAL release 4ac91e105e Update Slang, Vulkan, Gltf and ImGui. Offload natives to sub-packages.
Public-PR: https://github.com/ahwootech/BRUTAL/pull/9
Public-PR: https://github.com/ahwootech/BRUTAL/pull/15
Public-PR: https://github.com/ahwootech/BRUTAL/pull/21
Fixes: ahwootech/BRUTAL#8
Fixes: ahwootech/BRUTAL#22
Co-authored-by: Laurens de Voogd <laurens@devoogd.be>
Co-authored-by: sGo7-Dev <goulax16@gmail.com>
Co-authored-by: Capsup <capsup@live.dk>
2026-10-23 15:07:17 +13:00

383 lines
12 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
/// A typed view into a buffer view that contains raw binary data.
/// </summary>
public partial class Accessor {
/// <summary>
/// Backing field for BufferView.
/// </summary>
private System.Nullable<int> m_bufferView;
/// <summary>
/// Backing field for ByteOffset.
/// </summary>
private int m_byteOffset = 0;
/// <summary>
/// Backing field for ComponentType.
/// </summary>
private ComponentTypeEnum m_componentType;
/// <summary>
/// Backing field for Normalized.
/// </summary>
private bool m_normalized = false;
/// <summary>
/// Backing field for Count.
/// </summary>
private int m_count;
/// <summary>
/// Backing field for Type.
/// </summary>
private TypeEnum m_type;
/// <summary>
/// Backing field for Max.
/// </summary>
private float[] m_max;
/// <summary>
/// Backing field for Min.
/// </summary>
private float[] m_min;
/// <summary>
/// Backing field for Sparse.
/// </summary>
private AccessorSparse m_sparse;
/// <summary>
/// Backing field for Name.
/// </summary>
private string m_name;
/// <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 index of the bufferView.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("bufferView")]
public System.Nullable<int> BufferView {
get {
return this.m_bufferView;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("BufferView", value, "Expected value to be greater than or equal to 0");
}
this.m_bufferView = value;
}
}
/// <summary>
/// The offset relative to the start of the buffer view in bytes.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("byteOffset")]
public int ByteOffset {
get {
return this.m_byteOffset;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("ByteOffset", value, "Expected value to be greater than or equal to 0");
}
this.m_byteOffset = value;
}
}
/// <summary>
/// The datatype of the accessor's components.
/// </summary>
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("componentType")]
public ComponentTypeEnum ComponentType {
get {
return this.m_componentType;
}
set {
this.m_componentType = value;
}
}
/// <summary>
/// Specifies whether integer data values are normalized before usage.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("normalized")]
public bool Normalized {
get {
return this.m_normalized;
}
set {
this.m_normalized = value;
}
}
/// <summary>
/// The number of elements referenced by this accessor.
/// </summary>
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("count")]
public int Count {
get {
return this.m_count;
}
set {
if ((value < 1)) {
throw new System.ArgumentOutOfRangeException("Count", value, "Expected value to be greater than or equal to 1");
}
this.m_count = value;
}
}
/// <summary>
/// Specifies if the accessor's elements are scalars, vectors, or matrices.
/// </summary>
[System.Text.Json.Serialization.JsonConverterAttribute(typeof(System.Text.Json.Serialization.JsonStringEnumConverter<TypeEnum>))]
[System.Text.Json.Serialization.JsonRequiredAttribute()]
[System.Text.Json.Serialization.JsonPropertyNameAttribute("type")]
public TypeEnum Type {
get {
return this.m_type;
}
set {
this.m_type = value;
}
}
/// <summary>
/// Maximum value of each component in this accessor.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("max")]
public float[] Max {
get {
return this.m_max;
}
set {
if ((value == null)) {
this.m_max = value;
return;
}
if ((value.Length < 1u)) {
throw new System.ArgumentException("Array not long enough");
}
if ((value.Length > 16u)) {
throw new System.ArgumentException("Array too long");
}
this.m_max = value;
}
}
/// <summary>
/// Minimum value of each component in this accessor.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("min")]
public float[] Min {
get {
return this.m_min;
}
set {
if ((value == null)) {
this.m_min = value;
return;
}
if ((value.Length < 1u)) {
throw new System.ArgumentException("Array not long enough");
}
if ((value.Length > 16u)) {
throw new System.ArgumentException("Array too long");
}
this.m_min = value;
}
}
/// <summary>
/// Sparse storage of elements that deviate from their initialization value.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("sparse")]
public AccessorSparse Sparse {
get {
return this.m_sparse;
}
set {
this.m_sparse = value;
}
}
/// <summary>
/// The user-defined name of this object.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("name")]
public string Name {
get {
return this.m_name;
}
set {
this.m_name = 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 BufferView property should be serialized.
/// </summary>
public bool ShouldSerializeBufferView() {
return ((m_bufferView == null)
== false);
}
/// <summary>
/// This method is used to determine if the ByteOffset property should be serialized.
/// </summary>
public bool ShouldSerializeByteOffset() {
return ((m_byteOffset == 0)
== false);
}
/// <summary>
/// This method is used to determine if the Normalized property should be serialized.
/// </summary>
public bool ShouldSerializeNormalized() {
return ((m_normalized == false)
== false);
}
/// <summary>
/// This method is used to determine if the Max property should be serialized.
/// </summary>
public bool ShouldSerializeMax() {
return ((m_max == null)
== false);
}
/// <summary>
/// This method is used to determine if the Min property should be serialized.
/// </summary>
public bool ShouldSerializeMin() {
return ((m_min == null)
== false);
}
/// <summary>
/// This method is used to determine if the Sparse property should be serialized.
/// </summary>
public bool ShouldSerializeSparse() {
return ((m_sparse == null)
== false);
}
/// <summary>
/// This method is used to determine if the Name property should be serialized.
/// </summary>
public bool ShouldSerializeName() {
return ((m_name == 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);
}
/// <summary>
/// Enum part of the GLTF file schema
/// The datatype of the accessor's components.
/// </summary>
public enum ComponentTypeEnum {
Byte = 5120,
UnsignedByte = 5121,
Short = 5122,
UnsignedShort = 5123,
UnsignedInt = 5125,
Float = 5126,
}
/// <summary>
/// Enum part of the GLTF file schema
/// Specifies if the accessor's elements are scalars, vectors, or matrices.
/// </summary>
public enum TypeEnum {
Scalar,
Vec2,
Vec3,
Vec4,
Mat2,
Mat3,
Mat4,
}
}
}