Data class for one glTF node, reduced to skeleton-import fields: name, parent/child indices, mesh flag, and rest local TRS transform. Part of a weapon importer's glTF format layer.
#nullable enable annotations
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
using System.Text.Json;
namespace WeaponImporter.EditorTools.Core.Formats.Gltf;
using Vector3 = System.Numerics.Vector3; // s&box compat: shadow engine's global-namespace Vector3 (see Editor/Core/Assembly.cs)
/// <summary>One glTF node, reduced to what skeleton import needs (TRS rest + hierarchy).</summary>
internal sealed class GltfNode
{
public string? Name;
public int[] Children = Array.Empty<int>();
public int Parent = -1;
public bool HasMesh;
// Rest local transform: TRS properties, or the decomposed "matrix" property (the spec
// makes them exclusive; animated nodes must use TRS). Shear is not representable.
public Vector3 Translation; // meters
public Quaternion Rotation = Quaternion.Identity; // xyzw
public Vector3 Scale = Vector3.One;
}