pub struct Point3D {
pub x: f64,
pub y: f64,
pub z: f64,
}
Expand description
Point3D, a point / position within 3D space
Fields§
§x: f64
§y: f64
§z: f64
Implementations§
Trait Implementations§
Source§impl Is3D for Point3D
impl Is3D for Point3D
Source§impl IsBuildable3D for Point3D
impl IsBuildable3D for Point3D
Source§fn from<P>(&mut self, other: &P)where
P: Is3D,
fn from<P>(&mut self, other: &P)where
P: Is3D,
Should use the coordinates of another as its own
Source§fn multiply_m(&self, m: &Matrix4) -> Self
fn multiply_m(&self, m: &Matrix4) -> Self
Applies a matrix to this
Source§fn normalized(&self) -> Result<Self>
fn normalized(&self) -> Result<Self>
Returns this with normalized values
Source§impl IsBuildableND for Point3D
impl IsBuildableND for Point3D
Source§impl IsEditable3D for Point3D
impl IsEditable3D for Point3D
Source§fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive)where
P: Is3D,
fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive)where
P: Is3D,
Increases distance towards other by factor
Source§fn add<P>(&mut self, other: &P)where
P: Is3D,
fn add<P>(&mut self, other: &P)where
P: Is3D,
Adds the coordinates of other onto this. x = x + other.x …
Source§impl IsEditableND for Point3D
impl IsEditableND for Point3D
Source§impl IsMatrix4Transformable for Point3D
impl IsMatrix4Transformable for Point3D
Source§impl IsMovable3D for Point3D
impl IsMovable3D for Point3D
Source§impl IsND for Point3D
impl IsND for Point3D
Source§fn n_dimensions() -> usize
fn n_dimensions() -> usize
Should return the number of dimensions. E.g. 2 for points in 2D space, 3 for points in 3D space etc.
Source§impl IsTransFormableTo2D for Point3D
impl IsTransFormableTo2D for Point3D
Source§fn transform_to_2d<P>(&self) -> Pwhere
P: IsBuildable2D,
fn transform_to_2d<P>(&self) -> Pwhere
P: IsBuildable2D,
Should create representation of self within the 2D space
Source§impl Ord for Point3D
impl Ord for Point3D
Source§impl PartialOrd for Point3D
impl PartialOrd for Point3D
impl Eq for Point3D
impl StructuralPartialEq for Point3D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more