pub struct Point3<S> {
pub x: S,
pub y: S,
pub z: S,
}
Expand description
A point in 3-dimensional space.
Fields§
§x: S
§y: S
§z: S
Implementations§
Trait Implementations§
source§impl<S: BaseNum> Array for Point3<S>
impl<S: BaseNum> Array for Point3<S>
source§impl<S: PartialEq> PartialEq<Point3<S>> for Point3<S>
impl<S: PartialEq> PartialEq<Point3<S>> for Point3<S>
source§impl<S: BaseFloat> Rotation<Point3<S>> for Basis3<S>
impl<S: BaseFloat> Rotation<Point3<S>> for Basis3<S>
source§fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Basis3<S>
fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Basis3<S>
Create a rotation to a given direction with an ‘up’ vector
source§fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Basis3<S>
fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Basis3<S>
Create a shortest rotation to transform vector ‘a’ into ‘b’.
Both given vectors are assumed to have unit length.
source§fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
Rotate a vector using this rotation.
source§fn concat(&self, other: &Basis3<S>) -> Basis3<S>
fn concat(&self, other: &Basis3<S>) -> Basis3<S>
Create a new rotation which combines both this rotation, and another.
source§fn concat_self(&mut self, other: &Basis3<S>)
fn concat_self(&mut self, other: &Basis3<S>)
Modify this rotation in-place by combining it with another.
source§fn invert(&self) -> Basis3<S>
fn invert(&self) -> Basis3<S>
Create a new rotation which “un-does” this rotation. That is,
r.concat(r.invert())
is the identity.source§fn invert_self(&mut self)
fn invert_self(&mut self)
Invert this rotation in-place.
source§fn rotate_point(&self, point: P) -> P
fn rotate_point(&self, point: P) -> P
Rotate a point using this rotation, by converting it to its
representation as a vector.
source§impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S>
impl<S: BaseFloat> Rotation<Point3<S>> for Quaternion<S>
source§fn one() -> Quaternion<S>
fn one() -> Quaternion<S>
Create the identity transform (causes no transformation).
source§fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Quaternion<S>
fn look_at(dir: Vector3<S>, up: Vector3<S>) -> Quaternion<S>
Create a rotation to a given direction with an ‘up’ vector
source§fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Quaternion<S>
fn between_vectors(a: Vector3<S>, b: Vector3<S>) -> Quaternion<S>
Create a shortest rotation to transform vector ‘a’ into ‘b’.
Both given vectors are assumed to have unit length.
source§fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn rotate_vector(&self, vec: Vector3<S>) -> Vector3<S>
Rotate a vector using this rotation.
source§fn concat(&self, other: &Quaternion<S>) -> Quaternion<S>
fn concat(&self, other: &Quaternion<S>) -> Quaternion<S>
Create a new rotation which combines both this rotation, and another.
source§fn concat_self(&mut self, other: &Quaternion<S>)
fn concat_self(&mut self, other: &Quaternion<S>)
Modify this rotation in-place by combining it with another.
source§fn invert(&self) -> Quaternion<S>
fn invert(&self) -> Quaternion<S>
Create a new rotation which “un-does” this rotation. That is,
r.concat(r.invert())
is the identity.source§fn invert_self(&mut self)
fn invert_self(&mut self)
Invert this rotation in-place.
source§fn rotate_point(&self, point: P) -> P
fn rotate_point(&self, point: P) -> P
Rotate a point using this rotation, by converting it to its
representation as a vector.
source§impl<S: BaseFloat> Transform<Point3<S>> for AffineMatrix3<S>
impl<S: BaseFloat> Transform<Point3<S>> for AffineMatrix3<S>
source§fn one() -> AffineMatrix3<S>
fn one() -> AffineMatrix3<S>
Create an identity transformation. That is, a transformation which
does nothing.
source§fn look_at(
eye: Point3<S>,
center: Point3<S>,
up: Vector3<S>
) -> AffineMatrix3<S>
fn look_at( eye: Point3<S>, center: Point3<S>, up: Vector3<S> ) -> AffineMatrix3<S>
Create a transformation that rotates a vector to look at
center
from
eye
, using up
for orientation.source§fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
fn transform_vector(&self, vec: Vector3<S>) -> Vector3<S>
Transform a vector using this transform.
source§fn transform_point(&self, point: Point3<S>) -> Point3<S>
fn transform_point(&self, point: Point3<S>) -> Point3<S>
Transform a point using this transform.
source§fn concat(&self, other: &AffineMatrix3<S>) -> AffineMatrix3<S>
fn concat(&self, other: &AffineMatrix3<S>) -> AffineMatrix3<S>
Combine this transform with another, yielding a new transformation
which has the effects of both.
source§fn invert(&self) -> Option<AffineMatrix3<S>>
fn invert(&self) -> Option<AffineMatrix3<S>>
Create a transform that “un-does” this one.
source§fn transform_as_point(&self, vec: P::Vector) -> P::Vector
fn transform_as_point(&self, vec: P::Vector) -> P::Vector
Transform a vector as a point using this transform.
source§fn concat_self(&mut self, other: &Self)
fn concat_self(&mut self, other: &Self)
Combine this transform with another, in-place.
source§fn invert_self(&mut self)
fn invert_self(&mut self)
Invert this transform in-place, failing if the transformation is not
invertible.
impl<S: Copy> Copy for Point3<S>
impl<S: Eq> Eq for Point3<S>
impl<S> StructuralEq for Point3<S>
impl<S> StructuralPartialEq for Point3<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for Point3<S>where S: RefUnwindSafe,
impl<S> Send for Point3<S>where S: Send,
impl<S> Sync for Point3<S>where S: Sync,
impl<S> Unpin for Point3<S>where S: Unpin,
impl<S> UnwindSafe for Point3<S>where S: UnwindSafe,
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