pub struct Model3DFile {
pub header: Model3DHeader,
pub version: ModelVersion,
pub frame_data: Vec<FrameDataEntry>,
pub face_data: Vec<FaceData>,
pub vertex_coords: Vec<VertexCoord>,
pub face_normals: Vec<FaceNormal>,
pub normal_indices: Vec<u32>,
pub vertex_normals: Vec<VertexNormal>,
pub frame_vertex_data: Vec<FrameVertexData>,
pub frame_normal_data: Vec<FrameNormalData>,
}Expand description
Parsed 3D/3DC model including geometry and frame metadata.
Fields§
§header: Model3DHeader§version: ModelVersion§frame_data: Vec<FrameDataEntry>§face_data: Vec<FaceData>§vertex_coords: Vec<VertexCoord>§face_normals: Vec<FaceNormal>§normal_indices: Vec<u32>§vertex_normals: Vec<VertexNormal>§frame_vertex_data: Vec<FrameVertexData>Per-frame vertex positions. Empty if no animation frames.
frame_normal_data: Vec<FrameNormalData>Per-frame face normals. Empty if no animation frames.
Implementations§
Source§impl Model3DFile
impl Model3DFile
Sourcepub fn total_face_vertices(&self) -> usize
pub fn total_face_vertices(&self) -> usize
Counts vertices referenced by all parsed faces.
Sourcepub fn bounding_box(&self) -> Option<(VertexCoord, VertexCoord)>
pub fn bounding_box(&self) -> Option<(VertexCoord, VertexCoord)>
Computes an axis-aligned bounding box from parsed vertex positions.
Source§impl Model3DFile
impl Model3DFile
Sourcepub fn at_frame(&self, frame: usize) -> Result<Self>
pub fn at_frame(&self, frame: usize) -> Result<Self>
Resolves a frame to absolute positions in parser model units.
The parser has already reconstructed compressed frame positions. Frame zero uses the parsed base geometry. Incomplete frames are rejected. The returned model is a static snapshot with no animation frame table.
Trait Implementations§
Source§impl Clone for Model3DFile
impl Clone for Model3DFile
Source§impl Debug for Model3DFile
impl Debug for Model3DFile
Auto Trait Implementations§
impl Freeze for Model3DFile
impl RefUnwindSafe for Model3DFile
impl Send for Model3DFile
impl Sync for Model3DFile
impl Unpin for Model3DFile
impl UnsafeUnpin for Model3DFile
impl UnwindSafe for Model3DFile
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.