pub struct MeshImporter;Expand description
Mesh importer supporting OBJ, binary STL, ASCII STL, and PLY.
Implementations§
Source§impl MeshImporter
impl MeshImporter
Sourcepub fn parse_obj(&self, src: &str) -> MeshData
pub fn parse_obj(&self, src: &str) -> MeshData
Parse a Wavefront OBJ string into a MeshData.
Supports v, vn, vt, and f directives.
Sourcepub fn parse_stl_binary(&self, data: &[u8]) -> Option<MeshData>
pub fn parse_stl_binary(&self, data: &[u8]) -> Option<MeshData>
Parse a binary STL byte slice into a MeshData.
Expects the standard 80-byte header + 4-byte count + 50 bytes per triangle.
Sourcepub fn parse_stl_ascii(&self, src: &str) -> MeshData
pub fn parse_stl_ascii(&self, src: &str) -> MeshData
Parse an ASCII STL string into a MeshData.
Sourcepub fn parse_ply_ascii(&self, src: &str) -> Option<MeshData>
pub fn parse_ply_ascii(&self, src: &str) -> Option<MeshData>
Parse an ASCII PLY string into a MeshData.
Trait Implementations§
Source§impl Debug for MeshImporter
impl Debug for MeshImporter
Source§impl Default for MeshImporter
impl Default for MeshImporter
Source§fn default() -> MeshImporter
fn default() -> MeshImporter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MeshImporter
impl RefUnwindSafe for MeshImporter
impl Send for MeshImporter
impl Sync for MeshImporter
impl Unpin for MeshImporter
impl UnsafeUnpin for MeshImporter
impl UnwindSafe for MeshImporter
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.