pub struct MdlSaber {
pub mesh: MdlMesh,
pub saber_verts: Vec<[f32; 3]>,
pub saber_uvs: Vec<[f32; 2]>,
pub saber_normals: Vec<[f32; 3]>,
pub gl_pool_vert: u32,
pub gl_pool_index: u32,
}Expand description
Lightsaber blade mesh.
Extends MdlMesh with saber-specific geometry data for 176 fixed
vertices. All lightsaber models use exactly NUM_SABER_VERTS (176)
vertices for blade geometry.
Binary layout: 20 extra bytes (0x14) after the 332-byte TriMesh header.
Contains 3 relocated data pointers for saber vertex data and 2 runtime
GL render pool IDs (allocated by GLRender::RequestPool at load time,
not meaningful in the binary file).
Semantic names from kotorblender: off_saber_verts, off_saber_uv,
off_saber_normals, inv_count1, inv_count2.
Verified via InputBinary::ResetLightsaber (0x004a0460) and
ParseNode allocation (operator_new(0x1B0)).
See docs/notes/mdl_mdx.md §Mesh Subtype Structs.
Fields§
§mesh: MdlMeshThe base triangle mesh.
saber_verts: Vec<[f32; 3]>Saber vertex positions (176 × vec3). Saber extra +0x00 pointer.
saber_uvs: Vec<[f32; 2]>Saber texture coordinates (176 × vec2). Saber extra +0x04 pointer.
saber_normals: Vec<[f32; 3]>Saber vertex normals (176 × vec3). Saber extra +0x08 pointer.
gl_pool_vert: u32GL vertex pool ID (runtime-only, stale in binary). Saber extra +0x0C.
gl_pool_index: u32GL index pool ID (runtime-only, stale in binary). Saber extra +0x10.