Struct scad_tree_math::Pt3
source · pub struct Pt3 {
pub x: f64,
pub y: f64,
pub z: f64,
}
Expand description
A 3D point.
Fields§
§x: f64
§y: f64
§z: f64
Implementations§
source§impl Pt3
impl Pt3
pub fn new(x: f64, y: f64, z: f64) -> Self
pub fn dot(self, rhs: Self) -> f64
pub fn cross(self, rhs: Self) -> Self
pub fn len2(self) -> f64
pub fn len(self) -> f64
pub fn normalize(&mut self)
pub fn normalized(self) -> Self
pub fn rotated_x(self, degrees: f64) -> Self
pub fn rotate_x(&mut self, degrees: f64)
pub fn rotated_y(self, degrees: f64) -> Self
pub fn rotate_y(&mut self, degrees: f64)
pub fn rotated_z(self, degrees: f64) -> Self
pub fn rotate_z(&mut self, degrees: f64)
pub fn lerp(self, b: Self, t: f64) -> Self
pub fn as_pt4(self, w: f64) -> Pt4
Trait Implementations§
source§impl AddAssign for Pt3
impl AddAssign for Pt3
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moresource§impl DivAssign<f64> for Pt3
impl DivAssign<f64> for Pt3
source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moresource§impl MulAssign<f64> for Pt3
impl MulAssign<f64> for Pt3
source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moresource§impl SubAssign for Pt3
impl SubAssign for Pt3
source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for Pt3
impl StructuralPartialEq for Pt3
Auto Trait Implementations§
impl RefUnwindSafe for Pt3
impl Send for Pt3
impl Sync for Pt3
impl Unpin for Pt3
impl UnwindSafe for Pt3
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