pub struct ObjWriter { /* private fields */ }Available on crate feature
obj-writer only.Expand description
Implementations§
Source§impl ObjWriter
impl ObjWriter
Sourcepub fn add_points(&mut self, points: &[[f32; 3]])
pub fn add_points(&mut self, points: &[[f32; 3]])
Add raw point positions (for point cloud output).
Sourcepub fn vertex_count(&self) -> usize
pub fn vertex_count(&self) -> usize
Get the number of vertices added.
Sourcepub fn face_count(&self) -> usize
pub fn face_count(&self) -> usize
Get the number of faces added.
Sourcepub fn write<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn write<P: AsRef<Path>>(&self, path: P) -> Result<()>
Write the OBJ file to the given path.
Sourcepub fn write_to_vec(&self) -> Result<Vec<u8>>
pub fn write_to_vec(&self) -> Result<Vec<u8>>
Write the OBJ data into a byte vector.
Trait Implementations§
Source§impl PointCloudWriter for ObjWriter
impl PointCloudWriter for ObjWriter
Source§impl WriteToBytes for ObjWriter
impl WriteToBytes for ObjWriter
Source§impl Writer for ObjWriter
impl Writer for ObjWriter
Source§fn add_mesh(&mut self, mesh: &Mesh, name: Option<&str>) -> Result<()>
fn add_mesh(&mut self, mesh: &Mesh, name: Option<&str>) -> Result<()>
Add a mesh to be written. Read more
Source§fn write<P: AsRef<Path>>(&self, path: P) -> Result<()>
fn write<P: AsRef<Path>>(&self, path: P) -> Result<()>
Write all added meshes to a file. Read more
Source§fn vertex_count(&self) -> usize
fn vertex_count(&self) -> usize
Get the number of meshes/vertices added.
Source§fn face_count(&self) -> usize
fn face_count(&self) -> usize
Get the number of faces added (if applicable).
Auto Trait Implementations§
impl Freeze for ObjWriter
impl RefUnwindSafe for ObjWriter
impl Send for ObjWriter
impl Sync for ObjWriter
impl Unpin for ObjWriter
impl UnsafeUnpin for ObjWriter
impl UnwindSafe for ObjWriter
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