pub struct Vec3 { /* private fields */ }Expand description
Three-dimensional floating-point vector for 3D positions, directions, normals, and RGB radiance.
Implementations§
Source§impl Vec3
Vector arithmetic, normalization, dot/cross products, and reflection helpers for Vec3.
impl Vec3
Vector arithmetic, normalization, dot/cross products, and reflection helpers for Vec3.
Sourcepub fn from_color(c: Color) -> Self
pub fn from_color(c: Color) -> Self
Source§impl Vec3
impl Vec3
pub fn get_x(&self) -> f32
pub fn get_mut_x(&mut self) -> &mut f32
pub fn set_x(&mut self, val: f32) -> &mut Self
pub fn get_y(&self) -> f32
pub fn get_mut_y(&mut self) -> &mut f32
pub fn set_y(&mut self, val: f32) -> &mut Self
pub fn get_z(&self) -> f32
pub fn get_mut_z(&mut self) -> &mut f32
pub fn set_z(&mut self, val: f32) -> &mut Self
Trait Implementations§
impl Copy for Vec3
impl StructuralPartialEq for Vec3
Auto Trait Implementations§
impl Forget for Vec3
impl Freeze for Vec3
impl Move for Vec3
impl RefUnwindSafe for Vec3
impl Send for Vec3
impl Sync for Vec3
impl Unpin for Vec3
impl UnsafeUnpin for Vec3
impl UnwindSafe for Vec3
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