pub struct Point3D {
pub x: f32,
pub y: f32,
pub z: f32,
}Fields§
§x: f32§y: f32§z: f32Implementations§
Source§impl Point3D
impl Point3D
pub fn add(&self, other: &Point3D) -> Point3D
pub fn subtract(&self, other: &Point3D) -> Point3D
pub fn scalar_multiply(&self, scalar: f32) -> Point3D
pub fn rotate_around_axis( &self, axis: Point3D, origin: Point3D, angle_rad: f32, ) -> Point3D
pub fn rotate_y(self, angle: f32) -> Self
pub fn rotate_x(self, angle: f32) -> Self
pub fn rotate_z(self, angle: f32) -> Self
pub fn translate(self, offset: Point3D) -> Self
pub fn dot(&self, other: &Point3D) -> f32
pub fn cross(&self, other: &Point3D) -> Point3D
pub fn normalize(&self) -> Point3D
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Point3D
impl RefUnwindSafe for Point3D
impl Send for Point3D
impl Sync for Point3D
impl Unpin for Point3D
impl UnwindSafe for Point3D
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