Struct RawObj

Source
pub struct RawObj {
Show 13 fields pub name: Option<String>, pub material_libraries: Vec<String>, pub positions: Vec<(f32, f32, f32, f32)>, pub tex_coords: Vec<(f32, f32, f32)>, pub normals: Vec<(f32, f32, f32)>, pub param_vertices: Vec<(f32, f32, f32)>, pub points: Vec<Point>, pub lines: Vec<Line>, pub polygons: Vec<Polygon>, pub groups: HashMap<String, Group>, pub meshes: HashMap<String, Group>, pub smoothing_groups: HashMap<usize, Group>, pub merging_groups: HashMap<usize, Group>,
}
Expand description

Low-level Rust binding for .obj format.

Fields§

§name: Option<String>

Name of the object.

§material_libraries: Vec<String>

.mtl files which required by this object.

§positions: Vec<(f32, f32, f32, f32)>

Position vectors of each vertex.

§tex_coords: Vec<(f32, f32, f32)>

Texture coordinates of each vertex.

§normals: Vec<(f32, f32, f32)>

Normal vectors of each vertex.

§param_vertices: Vec<(f32, f32, f32)>

Parametric vertices.

§points: Vec<Point>

Points which stores the index data of position vectors.

§lines: Vec<Line>

Lines which store the index data of vectors.

§polygons: Vec<Polygon>

Polygons which store the index data of vectors.

§groups: HashMap<String, Group>

Groups of multiple geometries.

§meshes: HashMap<String, Group>

Geometries which consist in a same material.

§smoothing_groups: HashMap<usize, Group>

Smoothing groups.

§merging_groups: HashMap<usize, Group>

Merging groups.

Trait Implementations§

Source§

impl Clone for RawObj

Source§

fn clone(&self) -> RawObj

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RawObj

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RawObj

Source§

fn default() -> RawObj

Returns the “default value” for a type. Read more
Source§

impl PartialEq for RawObj

Source§

fn eq(&self, other: &RawObj) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for RawObj

Auto Trait Implementations§

§

impl Freeze for RawObj

§

impl RefUnwindSafe for RawObj

§

impl Send for RawObj

§

impl Sync for RawObj

§

impl Unpin for RawObj

§

impl UnwindSafe for RawObj

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.