pub struct StandardAttributes {
pub positions: Vec<Point3<f64>>,
pub uv_coords: Vec<Vector2<f64>>,
pub normals: Vec<Vector3<f64>>,
}Expand description
standard attributions
Fields§
§positions: Vec<Point3<f64>>positions
uv_coords: Vec<Vector2<f64>>texture uv coordinates
normals: Vec<Vector3<f64>>normals at vertices
Implementations§
Source§impl StandardAttributes
impl StandardAttributes
Sourcepub fn positions_mut(&mut self) -> &mut [Point3<f64>]
pub fn positions_mut(&mut self) -> &mut [Point3<f64>]
Returns the mutable slice of all positions.
Sourcepub fn push_position(&mut self, position: Point3<f64>)
pub fn push_position(&mut self, position: Point3<f64>)
Adds a position.
Sourcepub fn extend_positions<I>(&mut self, iter: I)
pub fn extend_positions<I>(&mut self, iter: I)
Extend positions by iterator.
Sourcepub const fn uv_coords(&self) -> &Vec<Vector2<f64>>
pub const fn uv_coords(&self) -> &Vec<Vector2<f64>>
Returns the vector of all uv (texture) coordinates.
Sourcepub fn uv_coords_mut(&mut self) -> &mut [Vector2<f64>]
pub fn uv_coords_mut(&mut self) -> &mut [Vector2<f64>]
Returns the mutable slice of all uv (texture) coordinates.
Sourcepub fn push_uv_coord(&mut self, uv_coord: Vector2<f64>)
pub fn push_uv_coord(&mut self, uv_coord: Vector2<f64>)
Adds a uv (texture) coordinate.
Sourcepub fn extend_uv_coords<I>(&mut self, iter: I)
pub fn extend_uv_coords<I>(&mut self, iter: I)
Extend uv (texture) coordinates by iterator.
Sourcepub fn normals_mut(&mut self) -> &mut [Vector3<f64>]
pub fn normals_mut(&mut self) -> &mut [Vector3<f64>]
Returns the mutable slice of all normals.
Sourcepub fn extend_normals<I>(&mut self, iter: I)
pub fn extend_normals<I>(&mut self, iter: I)
Extend normals by iterator
Trait Implementations§
Source§impl Attributes<StandardVertex> for StandardAttributes
impl Attributes<StandardVertex> for StandardAttributes
Source§type Output = StandardAttribute
type Output = StandardAttribute
attribution
Source§fn get(
&self,
v: StandardVertex,
) -> Option<<StandardAttributes as Attributes<StandardVertex>>::Output>
fn get( &self, v: StandardVertex, ) -> Option<<StandardAttributes as Attributes<StandardVertex>>::Output>
get attribution corresponding to vertex
Source§impl Clone for StandardAttributes
impl Clone for StandardAttributes
Source§fn clone(&self) -> StandardAttributes
fn clone(&self) -> StandardAttributes
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardAttributes
impl Debug for StandardAttributes
Source§impl Default for StandardAttributes
impl Default for StandardAttributes
Source§fn default() -> StandardAttributes
fn default() -> StandardAttributes
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StandardAttributes
impl<'de> Deserialize<'de> for StandardAttributes
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StandardAttributes, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StandardAttributes, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StandardAttributes
impl PartialEq for StandardAttributes
Source§impl Serialize for StandardAttributes
impl Serialize for StandardAttributes
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 StructuralPartialEq for StandardAttributes
Auto Trait Implementations§
impl Freeze for StandardAttributes
impl RefUnwindSafe for StandardAttributes
impl Send for StandardAttributes
impl Sync for StandardAttributes
impl Unpin for StandardAttributes
impl UnwindSafe for StandardAttributes
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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().