pub struct M2Header {Show 45 fields
pub magic: [u8; 4],
pub version: u32,
pub name: M2Array<u8>,
pub flags: M2ModelFlags,
pub global_sequences: M2Array<u32>,
pub animations: M2Array<u32>,
pub animation_lookup: M2Array<u16>,
pub playable_animation_lookup: Option<M2Array<u16>>,
pub bones: M2Array<u32>,
pub key_bone_lookup: M2Array<u16>,
pub vertices: M2Array<u32>,
pub views: M2Array<u32>,
pub num_skin_profiles: Option<u32>,
pub color_animations: M2Array<u32>,
pub textures: M2Array<u32>,
pub transparency_lookup: M2Array<u16>,
pub texture_flipbooks: Option<M2Array<u32>>,
pub texture_animations: M2Array<u32>,
pub color_replacements: M2Array<u32>,
pub render_flags: M2Array<u32>,
pub bone_lookup_table: M2Array<u16>,
pub texture_lookup_table: M2Array<u16>,
pub texture_units: M2Array<u16>,
pub transparency_lookup_table: M2Array<u16>,
pub texture_animation_lookup: M2Array<u16>,
pub bounding_box_min: [f32; 3],
pub bounding_box_max: [f32; 3],
pub bounding_sphere_radius: f32,
pub collision_box_min: [f32; 3],
pub collision_box_max: [f32; 3],
pub collision_sphere_radius: f32,
pub bounding_triangles: M2Array<u32>,
pub bounding_vertices: M2Array<u32>,
pub bounding_normals: M2Array<u32>,
pub attachments: M2Array<u32>,
pub attachment_lookup_table: M2Array<u16>,
pub events: M2Array<u32>,
pub lights: M2Array<u32>,
pub cameras: M2Array<u32>,
pub camera_lookup_table: M2Array<u16>,
pub ribbon_emitters: M2Array<u32>,
pub particle_emitters: M2Array<u32>,
pub blend_map_overrides: Option<M2Array<u32>>,
pub texture_combiner_combos: Option<M2Array<u32>>,
pub texture_transforms: Option<M2Array<u32>>,
}Expand description
M2 model header structure Based on: https://wowdev.wiki/M2#Header
Fields§
§magic: [u8; 4]Magic signature (“MD20”)
version: u32Version of the M2 file
name: M2Array<u8>Name of the model
flags: M2ModelFlagsFlags
global_sequences: M2Array<u32>Global sequences
animations: M2Array<u32>Animations
animation_lookup: M2Array<u16>Animation lookups (C in Classic)
playable_animation_lookup: Option<M2Array<u16>>Playable animation lookup - only present in versions <= 263
bones: M2Array<u32>Bones
key_bone_lookup: M2Array<u16>Key bone lookup
vertices: M2Array<u32>Vertices
views: M2Array<u32>Views (LOD levels) - M2Array for BC and earlier, count for later versions
num_skin_profiles: Option<u32>Number of skin profiles for WotLK+ (when views becomes a count)
color_animations: M2Array<u32>Color animations
textures: M2Array<u32>Textures
transparency_lookup: M2Array<u16>Transparency lookups
texture_flipbooks: Option<M2Array<u32>>Texture flipbooks - only present in BC and earlier
texture_animations: M2Array<u32>Texture animations
color_replacements: M2Array<u32>Color replacements
render_flags: M2Array<u32>Render flags
bone_lookup_table: M2Array<u16>Bone lookup table
texture_lookup_table: M2Array<u16>Texture lookup table
texture_units: M2Array<u16>Texture units
transparency_lookup_table: M2Array<u16>Transparency lookup table
texture_animation_lookup: M2Array<u16>Texture animation lookup table
bounding_box_min: [f32; 3]Bounding box min corner
bounding_box_max: [f32; 3]Bounding box max corner
bounding_sphere_radius: f32Bounding sphere radius
collision_box_min: [f32; 3]Collision bounding box min corner
collision_box_max: [f32; 3]Collision bounding box max corner
collision_sphere_radius: f32Collision bounding sphere radius
bounding_triangles: M2Array<u32>Bounding triangles
bounding_vertices: M2Array<u32>Bounding vertices
bounding_normals: M2Array<u32>Bounding normals
attachments: M2Array<u32>Attachments
attachment_lookup_table: M2Array<u16>Attachment lookup table
events: M2Array<u32>Events
lights: M2Array<u32>Lights
cameras: M2Array<u32>Cameras
camera_lookup_table: M2Array<u16>Camera lookup table
ribbon_emitters: M2Array<u32>Ribbon emitters
particle_emitters: M2Array<u32>Particle emitters
blend_map_overrides: Option<M2Array<u32>>Blend map overrides (BC+ with specific flag)
texture_combiner_combos: Option<M2Array<u32>>Texture combiner combos (added in Cataclysm)
texture_transforms: Option<M2Array<u32>>Texture transforms
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for M2Header
impl RefUnwindSafe for M2Header
impl Send for M2Header
impl Sync for M2Header
impl Unpin for M2Header
impl UnwindSafe for M2Header
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more