pub struct SkinHeader {
pub magic: [u8; 4],
pub version: u32,
pub name: M2Array<u8>,
pub vertex_count: u32,
pub indices: M2Array<u16>,
pub triangles: M2Array<u16>,
pub bone_indices: M2Array<u8>,
pub submeshes: M2Array<SkinSubmesh>,
pub batches: M2Array<SkinBatch>,
pub center_position: Option<[f32; 3]>,
pub center_bounds: Option<f32>,
}Expand description
Skin file header
Fields§
§magic: [u8; 4]Magic signature (“SKIN”)
version: u32Version of the file
name: M2Array<u8>Name of the parent model
vertex_count: u32Total number of vertices
indices: M2Array<u16>Indices
triangles: M2Array<u16>Triangles
bone_indices: M2Array<u8>Bone indices
submeshes: M2Array<SkinSubmesh>Submeshes
batches: M2Array<SkinBatch>Batches
center_position: Option<[f32; 3]>Center position (BfA and later)
center_bounds: Option<f32>Center bounds (BfA and later)
Implementations§
Source§impl SkinHeader
impl SkinHeader
Trait Implementations§
Source§impl Clone for SkinHeader
impl Clone for SkinHeader
Source§fn clone(&self) -> SkinHeader
fn clone(&self) -> SkinHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SkinHeader
impl Debug for SkinHeader
Source§impl SkinHeaderT for SkinHeader
impl SkinHeaderT for SkinHeader
Source§fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
fn parse<R: Read + Seek>(reader: &mut R) -> Result<Self>
Parse a Skin header from a reader (new format with version field)
Source§fn calculate_size(&self) -> usize
fn calculate_size(&self) -> usize
Calculate the size of the header for this skin version
fn set_array_fields( &mut self, indices: M2Array<u16>, triangles: M2Array<u16>, bone_indices: M2Array<u8>, submeshes: M2Array<SkinSubmesh>, batches: M2Array<SkinBatch>, )
fn indices(&self) -> &M2Array<u16>
fn triangles(&self) -> &M2Array<u16>
fn bone_indices(&self) -> &M2Array<u8>
fn submeshes(&self) -> &M2Array<SkinSubmesh>
fn batches(&self) -> &M2Array<SkinBatch>
Auto Trait Implementations§
impl Freeze for SkinHeader
impl RefUnwindSafe for SkinHeader
impl Send for SkinHeader
impl Sync for SkinHeader
impl Unpin for SkinHeader
impl UnsafeUnpin for SkinHeader
impl UnwindSafe for SkinHeader
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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