This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37

View file

@ -0,0 +1,182 @@
//------------------------------------------------------------------------------
// <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
/// glTF extension that enables shifting and scaling UV coordinates on a per-texture basis
/// Sourced from the 'KHR_texture_transform' extension
/// </summary>
public partial class TextureTransformGltfTextureinfoExtension {
/// <summary>
/// Backing field for Offset.
/// </summary>
private Brutal.Numerics.float2 m_offset = new Brutal.Numerics.float2(0F, 0F);
/// <summary>
/// Backing field for Rotation.
/// </summary>
private float m_rotation = 0F;
/// <summary>
/// Backing field for Scale.
/// </summary>
private Brutal.Numerics.float2 m_scale = new Brutal.Numerics.float2(1F, 1F);
/// <summary>
/// Backing field for TexCoord.
/// </summary>
private System.Nullable<int> m_texCoord;
/// <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 offset of the UV coordinate origin as a factor of the texture dimensions.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("offset")]
public Brutal.Numerics.float2 Offset {
get {
return this.m_offset;
}
set {
this.m_offset = value;
}
}
/// <summary>
/// Rotate the UVs by this many radians counter-clockwise around the origin.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("rotation")]
public float Rotation {
get {
return this.m_rotation;
}
set {
this.m_rotation = value;
}
}
/// <summary>
/// The scale factor applied to the components of the UV coordinates.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("scale")]
public Brutal.Numerics.float2 Scale {
get {
return this.m_scale;
}
set {
this.m_scale = value;
}
}
/// <summary>
/// Overrides the textureInfo texCoord value if supplied, and if this extension is supported.
/// </summary>
[System.Text.Json.Serialization.JsonPropertyNameAttribute("texCoord")]
public System.Nullable<int> TexCoord {
get {
return this.m_texCoord;
}
set {
if ((value < 0)) {
throw new System.ArgumentOutOfRangeException("TexCoord", value, "Expected value to be greater than or equal to 0");
}
this.m_texCoord = 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 Offset property should be serialized.
/// </summary>
public bool ShouldSerializeOffset() {
return ((m_offset == new Brutal.Numerics.float2(0F, 0F))
== false);
}
/// <summary>
/// This method is used to determine if the Rotation property should be serialized.
/// </summary>
public bool ShouldSerializeRotation() {
return ((m_rotation == 0F)
== false);
}
/// <summary>
/// This method is used to determine if the Scale property should be serialized.
/// </summary>
public bool ShouldSerializeScale() {
return ((m_scale == new Brutal.Numerics.float2(1F, 1F))
== false);
}
/// <summary>
/// This method is used to determine if the TexCoord property should be serialized.
/// </summary>
public bool ShouldSerializeTexCoord() {
return ((m_texCoord == 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);
}
}
}