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