Struct truck_polymesh::StandardAttributes
source · pub struct StandardAttributes {
pub positions: Vec<Point3>,
pub uv_coords: Vec<Vector2>,
pub normals: Vec<Vector3>,
}
Expand description
standard attributions
Fields§
§positions: Vec<Point3>
positions
uv_coords: Vec<Vector2>
texture uv coordinates
normals: Vec<Vector3>
normals at vertices
Implementations§
source§impl StandardAttributes
impl StandardAttributes
sourcepub fn positions_mut(&mut self) -> &mut [Point3]
pub fn positions_mut(&mut self) -> &mut [Point3]
Returns the mutable slice of all positions.
sourcepub fn push_position(&mut self, position: Point3)
pub fn push_position(&mut self, position: Point3)
Adds a position.
sourcepub fn extend_positions<I: IntoIterator<Item = Point3>>(&mut self, iter: I)
pub fn extend_positions<I: IntoIterator<Item = Point3>>(&mut self, iter: I)
Extend positions by iterator.
sourcepub const fn uv_coords(&self) -> &Vec<Vector2> ⓘ
pub const fn uv_coords(&self) -> &Vec<Vector2> ⓘ
Returns the vector of all uv (texture) coordinates.
sourcepub fn uv_coords_mut(&mut self) -> &mut [Vector2]
pub fn uv_coords_mut(&mut self) -> &mut [Vector2]
Returns the mutable slice of all uv (texture) coordinates.
sourcepub fn push_uv_coord(&mut self, uv_coord: Vector2)
pub fn push_uv_coord(&mut self, uv_coord: Vector2)
Adds a uv (texture) coordinate.
sourcepub fn extend_uv_coords<I: IntoIterator<Item = Vector2>>(&mut self, iter: I)
pub fn extend_uv_coords<I: IntoIterator<Item = Vector2>>(&mut self, iter: I)
Extend uv (texture) coordinates by iterator.
sourcepub fn normals_mut(&mut self) -> &mut [Vector3]
pub fn normals_mut(&mut self) -> &mut [Vector3]
Returns the mutable slice of all normals.
sourcepub fn extend_normals<I: IntoIterator<Item = Vector3>>(&mut self, iter: I)
pub fn extend_normals<I: IntoIterator<Item = Vector3>>(&mut self, iter: I)
Extend normals by iterator
Trait Implementations§
source§impl Attributes<StandardVertex> for StandardAttributes
impl Attributes<StandardVertex> for StandardAttributes
§type Output = StandardAttribute
type Output = StandardAttribute
attribution
source§impl Clone for StandardAttributes
impl Clone for StandardAttributes
source§fn clone(&self) -> StandardAttributes
fn clone(&self) -> StandardAttributes
Returns a copy of the value. Read more
1.0.0 · source§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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<StandardAttributes> for StandardAttributes
impl PartialEq<StandardAttributes> for StandardAttributes
source§fn eq(&self, other: &StandardAttributes) -> bool
fn eq(&self, other: &StandardAttributes) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.