pub struct Obj<V = Vertex, I = u16> {
pub name: Option<String>,
pub vertices: Vec<V>,
pub indices: Vec<I>,
}Expand description
3D model object loaded from wavefront OBJ.
Fields§
§name: Option<String>Object’s name.
vertices: Vec<V>Vertex buffer.
indices: Vec<I>Index buffer.
Implementations§
Trait Implementations§
Source§impl<'de, V, I> Deserialize<'de> for Obj<V, I>where
V: Deserialize<'de>,
I: Deserialize<'de>,
impl<'de, V, I> Deserialize<'de> for Obj<V, I>where
V: Deserialize<'de>,
I: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Obj<V, I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Obj<V, I>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<V, I> Serialize for Obj<V, I>
impl<V, I> Serialize for Obj<V, I>
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<V, I> Eq for Obj<V, I>
impl<V, I> StructuralPartialEq for Obj<V, I>
Auto Trait Implementations§
impl<V, I> Freeze for Obj<V, I>
impl<V, I> RefUnwindSafe for Obj<V, I>where
V: RefUnwindSafe,
I: RefUnwindSafe,
impl<V, I> Send for Obj<V, I>
impl<V, I> Sync for Obj<V, I>
impl<V, I> Unpin for Obj<V, I>
impl<V, I> UnwindSafe for Obj<V, I>where
V: UnwindSafe,
I: UnwindSafe,
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<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().