pub struct StandardAttributes {
pub positions: Vec<Point3<f64>, Global>,
pub uv_coords: Vec<Vector2<f64>, Global>,
pub normals: Vec<Vector3<f64>, Global>,
}
Expand description
standard attributions
Fields§
§positions: Vec<Point3<f64>, Global>
positions
uv_coords: Vec<Vector2<f64>, Global>
texture uv coordinates
normals: Vec<Vector3<f64>, Global>
normals at vertices
Implementations§
source§impl StandardAttributes
impl StandardAttributes
sourcepub const fn positions(&self) -> &Vec<Point3<f64>, Global> ⓘ
pub const fn positions(&self) -> &Vec<Point3<f64>, Global> ⓘ
Returns the vector of all positions.
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)where
I: IntoIterator<Item = Point3<f64>>,
pub fn extend_positions<I>(&mut self, iter: I)where
I: IntoIterator<Item = Point3<f64>>,
Extend positions by iterator.
sourcepub const fn uv_coords(&self) -> &Vec<Vector2<f64>, Global> ⓘ
pub const fn uv_coords(&self) -> &Vec<Vector2<f64>, Global> ⓘ
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)where
I: IntoIterator<Item = Vector2<f64>>,
pub fn extend_uv_coords<I>(&mut self, iter: I)where
I: IntoIterator<Item = Vector2<f64>>,
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)where
I: IntoIterator<Item = Vector3<f64>>,
pub fn extend_normals<I>(&mut self, iter: I)where
I: IntoIterator<Item = Vector3<f64>>,
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§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 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<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<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 ==
.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