pub struct ObjReader { /* private fields */ }Available on crate feature
obj-reader only.Expand description
OBJ format reader.
Reads vertex positions, texture coordinates, normals, and faces from OBJ files.
Implementations§
Source§impl ObjReader
impl ObjReader
Sourcepub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
pub fn from_bytes(bytes: impl Into<Vec<u8>>) -> Self
Create an OBJ reader from in-memory bytes.
Sourcepub fn read_from_bytes(bytes: &[u8]) -> Result<Mesh>
pub fn read_from_bytes(bytes: &[u8]) -> Result<Mesh>
Read a mesh directly from in-memory bytes.
Sourcepub fn read_positions(&mut self) -> Result<Vec<[f32; 3]>>
pub fn read_positions(&mut self) -> Result<Vec<[f32; 3]>>
Read all positions from the OBJ file.
Sourcepub fn read_mesh(&mut self) -> Result<Mesh>
pub fn read_mesh(&mut self) -> Result<Mesh>
Read a mesh with positions and faces (if present).
The mesh is automatically processed to match C++ Draco OBJ loader behavior: point IDs are deduplicated in face-traversal order, which ensures binary compatibility when encoding with sequential encoding (speed 10).
Trait Implementations§
Source§impl PointCloudReader for ObjReader
impl PointCloudReader for ObjReader
Source§impl ReadFromBytes for ObjReader
impl ReadFromBytes for ObjReader
Source§fn from_bytes(bytes: &[u8]) -> Result<Self>
fn from_bytes(bytes: &[u8]) -> Result<Self>
Create a reader from a complete file payload.
Auto Trait Implementations§
impl Freeze for ObjReader
impl RefUnwindSafe for ObjReader
impl Send for ObjReader
impl Sync for ObjReader
impl Unpin for ObjReader
impl UnsafeUnpin for ObjReader
impl UnwindSafe for ObjReader
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