pub struct MdlDangly {
pub mesh: MdlMesh,
pub constraints: Vec<f32>,
pub displacement: f32,
pub tightness: f32,
pub period: f32,
pub dangly_vertices: Vec<[f32; 3]>,
}Expand description
Dangly mesh with physics constraints.
Extends MdlMesh with per-vertex constraint weights and physics parameters
that control dangling geometry behavior (hair, cloaks, banners, etc.).
Binary layout: 28 extra bytes (0x1C) after the 332-byte TriMesh header.
Verified via InputBinary::ResetDangly (0x004a0100) and Ghidra struct
MdlNodeDanglyMesh (440 bytes total = 412 TriMesh + 28 extra).
See docs/notes/mdl_mdx.md §Mesh Subtype Structs.
Fields§
§mesh: MdlMeshThe base triangle mesh.
constraints: Vec<f32>Per-vertex constraint weights (float array).
Each value constrains how much a vertex can move (0.0 = fully fixed,
higher = more freedom). Array length matches mesh.vertex_count.
Data pointed to by CExoArrayList at dangly extra +0x00.
displacement: f32Maximum displacement distance (f32). Dangly extra +0x0C.
tightness: f32Spring tightness factor (f32). Dangly extra +0x10.
period: f32Oscillation period (f32). Dangly extra +0x14.
dangly_vertices: Vec<[f32; 3]>Per-vertex positions for the dangly constraint system (vec3 array).
Each entry is a 3-component position [x, y, z] for one constraint
vertex. Array length matches mesh.vertex_count. Pointed to by the
conditional data pointer at dangly extra +0x18 (only present when
vertex_count > 0).
At runtime, the engine copies this array into a GL vertex pool via
PartDanglyMesh constructor (0x00447980): allocates
vertex_count * 12 bytes, copies vertex_count vec3s from this
pointer, then uploads to GL.