pub struct VertexData {
pub x: f32,
pub y: f32,
pub z: f32,
pub attributes: HashMap<String, f32>,
}
Expand description
Vertex data containing position and attributes
Fields§
§x: f32
§y: f32
§z: f32
§attributes: HashMap<String, f32>
Implementations§
Source§impl VertexData
impl VertexData
pub fn new(point: Point) -> Self
pub fn position(&self) -> Point
pub fn set_position(&mut self, point: Point)
pub fn color(&self) -> [f32; 3]
pub fn set_color(&mut self, r: f32, g: f32, b: f32)
pub fn normal(&self) -> Option<[f32; 3]>
pub fn set_normal(&mut self, nx: f32, ny: f32, nz: f32)
Trait Implementations§
Source§impl Clone for VertexData
impl Clone for VertexData
Source§fn clone(&self) -> VertexData
fn clone(&self) -> VertexData
Returns a duplicate 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 VertexData
impl Debug for VertexData
Source§impl<'de> Deserialize<'de> for VertexData
impl<'de> Deserialize<'de> for VertexData
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
Auto Trait Implementations§
impl Freeze for VertexData
impl RefUnwindSafe for VertexData
impl Send for VertexData
impl Sync for VertexData
impl Unpin for VertexData
impl UnwindSafe for VertexData
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