#[repr(C)]pub struct Point3 {
pub x: f64,
pub y: f64,
pub z: f64,
}Expand description
A location in 3-D space.
Separate from Vec3 so the type system enforces correct usage
(e.g. Point3 - Point3 → Vec3, Point3 + Vec3 → Point3).
Fields§
§x: f64X coordinate (mm).
y: f64Y coordinate (mm).
z: f64Z coordinate (mm).
Implementations§
Source§impl Point3
impl Point3
Sourcepub fn offset_from(self, other: Self) -> Vec3
pub fn offset_from(self, other: Self) -> Vec3
Displacement vector from other to self: self - other.
Sourcepub fn distance_to(self, other: Self) -> f64
pub fn distance_to(self, other: Self) -> f64
Euclidean distance to other.
Trait Implementations§
Source§impl AddAssign<Vec3> for Point3
impl AddAssign<Vec3> for Point3
Source§fn add_assign(&mut self, v: Vec3)
fn add_assign(&mut self, v: Vec3)
Performs the
+= operation. Read moreimpl Copy for Point3
impl StructuralPartialEq for Point3
Auto Trait Implementations§
impl Freeze for Point3
impl RefUnwindSafe for Point3
impl Send for Point3
impl Sync for Point3
impl Unpin for Point3
impl UnsafeUnpin for Point3
impl UnwindSafe for Point3
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