Struct nalgebra::Point3
[−]
[src]
pub struct Point3<N> { pub x: N, pub y: N, pub z: N, }
Point of dimension 3.
The main differance between a point and a vector is that a vector is not affected by translations.
Fields
x: N
First component of the point.
y: N
Second component of the point.
z: N
Third component of the point.
Methods
impl<N> Point3<N>
[src]
impl<N: Copy> Point3<N>
[src]
unsafe fn at_fast(&self, i: usize) -> N
Unsafe read access to a vector element by index.
unsafe fn set_fast(&mut self, i: usize, val: N)
Unsafe write access to a vector element by index.
impl<N> Point3<N>
[src]
impl<N> Point3<N>
[src]
fn to_vector(self) -> Vector3<N>
Converts this point to its associated vector.
fn as_vector<'a>(&'a self) -> &'a Vector3<N>
Converts a reference to this point to a reference to its associated vector.
Trait Implementations
impl<N, O: Copy> Rotate<O> for Point3<N>
[src]
fn rotate(&self, other: &O) -> O
Applies a rotation to v
.
fn inverse_rotate(&self, other: &O) -> O
Applies an inverse rotation to v
.
impl<N: Eq> Eq for Point3<N>
[src]
impl<N: PartialEq> PartialEq for Point3<N>
[src]
fn eq(&self, __arg_0: &Point3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Point3<N>) -> bool
This method tests for !=
.
impl<N: Encodable> Encodable for Point3<N>
[src]
impl<N: Decodable> Decodable for Point3<N>
[src]
impl<N: Clone> Clone for Point3<N>
[src]
fn clone(&self) -> Point3<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<N: Hash> Hash for Point3<N>
[src]
fn hash<__HN: Hasher>(&self, __arg_0: &mut __HN)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<N: Debug> Debug for Point3<N>
[src]
impl<N: Copy> Copy for Point3<N>
[src]
impl<N: Zero> Origin for Point3<N>
[src]
fn origin() -> Point3<N>
The trivial origin.
fn is_origin(&self) -> bool
Returns true if this points is exactly the trivial origin.
impl<N: BaseFloat> PartialOrder for Point3<N>
[src]
fn inf(&self, other: &Point3<N>) -> Point3<N>
Returns the infimum of this value and another
fn sup(&self, other: &Point3<N>) -> Point3<N>
Returns the supremum of this value and another
fn partial_cmp(&self, other: &Point3<N>) -> PartialOrdering
Compare self
and other
using a partial ordering relation.
fn partial_lt(&self, other: &Point3<N>) -> bool
Returns true
iff self
and other
are comparable and self < other
.
fn partial_le(&self, other: &Point3<N>) -> bool
Returns true
iff self
and other
are comparable and self <= other
.
fn partial_gt(&self, other: &Point3<N>) -> bool
Returns true
iff self
and other
are comparable and self > other
.
fn partial_ge(&self, other: &Point3<N>) -> bool
Returns true
iff self
and other
are comparable and self >= other
.
fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of self
and other
if they are comparable.
fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of self
and other
if they are comparable.
fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
Clamp value
between min
and max
. Returns None
if value
is not comparable to min
or max
. Read more
impl<N: Copy + Mul<N, Output=N>> Mul<N> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> Point3<N>
The method for the *
operator
impl<N: Copy + MulAssign<N>> MulAssign<N> for Point3<N>
[src]
fn mul_assign(&mut self, right: N)
The method for the *=
operator
impl<N: Copy + Div<N, Output=N>> Div<N> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> Point3<N>
The method for the /
operator
impl<N: Copy + DivAssign<N>> DivAssign<N> for Point3<N>
[src]
fn div_assign(&mut self, right: N)
The method for the /=
operator
impl<N: Copy + Add<N, Output=N>> Add<N> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the +
operator
fn add(self, right: N) -> Point3<N>
The method for the +
operator
impl<N: Copy + AddAssign<N>> AddAssign<N> for Point3<N>
[src]
fn add_assign(&mut self, right: N)
The method for the +=
operator
impl<N: Copy + Sub<N, Output=N>> Sub<N> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> Point3<N>
The method for the -
operator
impl<N: Copy + SubAssign<N>> SubAssign<N> for Point3<N>
[src]
fn sub_assign(&mut self, right: N)
The method for the -=
operator
impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Point3<Nin>> for Point3<Nout>
[src]
impl<N> AsRef<[N; 3]> for Point3<N>
[src]
impl<N> AsMut<[N; 3]> for Point3<N>
[src]
impl<'a, N> From<&'a [N; 3]> for &'a Point3<N>
[src]
impl<'a, N> From<&'a mut [N; 3]> for &'a mut Point3<N>
[src]
impl<'a, N: Clone> From<&'a [N; 3]> for Point3<N>
[src]
impl<N, T> Index<T> for Point3<N> where [N]: Index<T>
[src]
type Output = [N]::Output
The returned type after indexing
fn index(&self, i: T) -> &[N]::Output
The method for the indexing (Foo[Bar]
) operation
impl<N, T> IndexMut<T> for Point3<N> where [N]: IndexMut<T>
[src]
impl<N> Shape<usize> for Point3<N>
[src]
impl<N: Copy> Indexable<usize, N> for Point3<N>
[src]
fn swap(&mut self, i1: usize, i2: usize)
Swaps the i
-th element of self
with its j
-th element.
unsafe fn unsafe_at(&self, i: usize) -> N
Reads the i
-th element of self
. Read more
unsafe fn unsafe_set(&mut self, i: usize, val: N)
Writes to the i
-th element of self
. Read more
impl<N: Copy> Repeat<N> for Point3<N>
[src]
impl<N> Dimension for Point3<N>
[src]
impl<N> PointAsVector for Point3<N>
[src]
type Vector = Vector3<N>
The vector type of the vector space associated to this point's affine space.
fn to_vector(self) -> Vector3<N>
Converts this point to its associated vector.
fn as_vector<'a>(&'a self) -> &'a Vector3<N>
Converts a reference to this point to a reference to its associated vector.
fn set_coords(&mut self, v: Vector3<N>)
Sets the coordinates of this point to match those of a given vector.
impl<N: Copy + Sub<N, Output=N>> Sub<Point3<N>> for Point3<N>
[src]
type Output = Vector3<N>
The resulting type after applying the -
operator
fn sub(self, right: Point3<N>) -> Vector3<N>
The method for the -
operator
impl<N: Neg<Output=N> + Copy> Neg for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the -
operator
fn neg(self) -> Point3<N>
The method for the unary -
operator
impl<N: Copy + Add<N, Output=N>> Add<Vector3<N>> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the +
operator
fn add(self, right: Vector3<N>) -> Point3<N>
The method for the +
operator
impl<N: Copy + AddAssign<N>> AddAssign<Vector3<N>> for Point3<N>
[src]
fn add_assign(&mut self, right: Vector3<N>)
The method for the +=
operator
impl<N: Copy + Sub<N, Output=N>> Sub<Vector3<N>> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the -
operator
fn sub(self, right: Vector3<N>) -> Point3<N>
The method for the -
operator
impl<N: Copy + SubAssign<N>> SubAssign<Vector3<N>> for Point3<N>
[src]
fn sub_assign(&mut self, right: Vector3<N>)
The method for the -=
operator
impl<N: ApproxEq<N>> ApproxEq<N> for Point3<N>
[src]
fn approx_epsilon(_: Option<Point3<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<Point3<N>>) -> u32
Default ULPs for approximation.
fn approx_eq(&self, other: &Point3<N>) -> bool
Tests approximate equality.
fn approx_eq_eps(&self, other: &Point3<N>, eps: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Point3<N>, ulps: u32) -> bool
Tests approximate equality using units in the last place (ULPs)
impl<N> FromIterator<N> for Point3<N>
[src]
fn from_iter<I: IntoIterator<Item=N>>(iterator: I) -> Point3<N>
Creates a value from an iterator. Read more
impl<N: Bounded> Bounded for Point3<N>
[src]
impl<N: Axpy<N>> Axpy<N> for Point3<N>
[src]
impl<N> Iterable<N> for Point3<N>
[src]
impl<N> IterableMut<N> for Point3<N>
[src]
impl<N: Copy + One + Zero> ToHomogeneous<Point4<N>> for Point3<N>
[src]
fn to_homogeneous(&self) -> Point4<N>
Gets the homogeneous coordinates form of this object.
impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Point4<N>> for Point3<N>
[src]
fn from(v: &Point4<N>) -> Point3<N>
Builds an object from its homogeneous coordinate form. Read more
impl<N> NumPoint<N> for Point3<N> where N: BaseNum
[src]
impl<N> FloatPoint<N> for Point3<N> where N: BaseFloat + ApproxEq<N>
[src]
fn distance_squared(&self, other: &Self) -> N
Computes the square distance between two points.
fn distance(&self, other: &Self) -> N
Computes the distance between two points.
impl<N: Rand> Rand for Point3<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Point3<N>
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: Display> Display for Point3<N>
[src]
impl<N: BaseNum + Neg<Output=N>> Mul<UnitQuaternion<N>> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: UnitQuaternion<N>) -> Point3<N>
The method for the *
operator
impl<N: BaseNum + Neg<Output=N>> MulAssign<UnitQuaternion<N>> for Point3<N>
[src]
fn mul_assign(&mut self, right: UnitQuaternion<N>)
The method for the *=
operator
impl<N: BaseNum> Mul<Rotation3<N>> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: Rotation3<N>) -> Point3<N>
The method for the *
operator
impl<N: Copy + BaseNum> MulAssign<Rotation3<N>> for Point3<N>
[src]
fn mul_assign(&mut self, right: Rotation3<N>)
The method for the *=
operator
impl<N: Copy + Mul<N, Output=N> + Add<N, Output=N>> Mul<Matrix3<N>> for Point3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: Matrix3<N>) -> Point3<N>
The method for the *
operator
impl<N: Copy + Mul<N, Output=N> + Add<N, Output=N>> MulAssign<Matrix3<N>> for Point3<N>
[src]
fn mul_assign(&mut self, right: Matrix3<N>)
The method for the *=
operator