struct property
Describes the raw memory layout, construction, and pointer representation of this struct type.
Implementation
static final StructType<Model> struct = ._builtin(
factory: Model.new,
layout: .aligned<ModelField>({
.transform: RStruct(Matrix.struct), // Local transform matrix
.meshCount: RInt(), // Number of meshes
.materialCount: RInt(), // Number of materials
.meshes: RPointer(RStruct(Mesh.struct)), // Meshes array
.materials: RPointer(RStruct(Material.struct)), // Materials array
.meshMaterial: RPointer(RInt()), // Mesh material number
// Animation data
.skeleton: RStruct(ModelSkeleton.struct), // Skeleton for animation
// Runtime animation data (CPU/GPU skinning)
.currentPose: RPointer(RStruct(Transform.struct)), // Current animation pose (Transform[])
.boneMatrices: RPointer(RStruct(Matrix.struct)), // Bones animated transformation matrices
}),
);