pub struct Model3DHeader {Show 16 fields
pub version: [u8; 4],
pub num_vertices: u32,
pub num_faces: u32,
pub radius: u32,
pub num_frames: u32,
pub offset_frame_data: u32,
pub total_face_vertices: u32,
pub offset_section4: u32,
pub section4_count: u32,
pub _unused_24: u32,
pub offset_normal_indices: u32,
pub offset_vertex_normals: u32,
pub offset_vertex_coords: u32,
pub offset_face_normals: u32,
pub total_face_vertices_dup: u32,
pub offset_face_data: u32,
}Expand description
Parsed 64-byte 3D model header.
Fields§
§version: [u8; 4]§num_vertices: u32§num_faces: u32§radius: u32§num_frames: u32§offset_frame_data: u32§total_face_vertices: u32§offset_section4: u32§section4_count: u32§_unused_24: u32Always 0 in v4.0/v5.0; bulk-copied as part of the 64-byte header but never individually read at runtime.
offset_normal_indices: u32§offset_vertex_normals: u32§offset_vertex_coords: u32§offset_face_normals: u32§total_face_vertices_dup: u32§offset_face_data: u32Implementations§
Source§impl Model3DHeader
impl Model3DHeader
Sourcepub fn version_string(&self) -> String
pub fn version_string(&self) -> String
Returns the header version bytes as a trimmed UTF-8 string.
Sourcepub fn parse_version(&self) -> ModelVersion
pub fn parse_version(&self) -> ModelVersion
Maps the header version string to a known ModelVersion variant.
Sourcepub fn is_v27_or_earlier(&self) -> bool
pub fn is_v27_or_earlier(&self) -> bool
Returns true for v2.6 and v2.7 layout variants.
Sourcepub fn is_v40_or_later(&self) -> bool
pub fn is_v40_or_later(&self) -> bool
Returns true for v4.0 and v5.0 layout variants.
Trait Implementations§
Source§impl Clone for Model3DHeader
impl Clone for Model3DHeader
Source§impl Debug for Model3DHeader
impl Debug for Model3DHeader
Auto Trait Implementations§
impl Freeze for Model3DHeader
impl RefUnwindSafe for Model3DHeader
impl Send for Model3DHeader
impl Sync for Model3DHeader
impl Unpin for Model3DHeader
impl UnsafeUnpin for Model3DHeader
impl UnwindSafe for Model3DHeader
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.