Struct nalgebra::Pnt3
[−]
[src]
pub struct Pnt3<N> { pub x: N, pub y: N, pub z: N, }
Point of dimension 3.
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> Pnt3<N>
[src]
impl<N: Copy> Pnt3<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> Pnt3<N>
[src]
impl<N> Pnt3<N>
[src]
fn to_vec(self) -> Vec3<N>
[−]
Converts this point to its associated vector.
fn as_vec<'a>(&'a self) -> &'a Vec3<N>
[−]
Converts a reference to this point to a reference to its associated vector.
Trait Implementations
impl<N, O: Copy> Rotate<O> for Pnt3<N>
[src]
fn rotate(&self, other: &O) -> O
[−]
Applies a rotation to v
.
fn inv_rotate(&self, other: &O) -> O
[−]
Applies an inverse rotation to v
.
impl<N: Copy> Copy for Pnt3<N>
[src]
impl<N: Debug> Debug for Pnt3<N>
[src]
impl<N: Hash> Hash for Pnt3<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: Clone> Clone for Pnt3<N>
[src]
fn clone(&self) -> Pnt3<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: Decodable> Decodable for Pnt3<N>
[src]
impl<N: Encodable> Encodable for Pnt3<N>
[src]
impl<N: PartialEq> PartialEq for Pnt3<N>
[src]
fn eq(&self, __arg_0: &Pnt3<N>) -> bool
[−]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Pnt3<N>) -> bool
[−]
This method tests for !=
.
impl<N: Eq> Eq for Pnt3<N>
[src]
impl<N: Zero> Orig for Pnt3<N>
[src]
fn orig() -> Pnt3<N>
[−]
The trivial origin.
fn is_orig(&self) -> bool
[−]
Returns true if this points is exactly the trivial origin.
impl<N: BaseFloat> POrd for Pnt3<N>
[src]
fn inf(&self, other: &Pnt3<N>) -> Pnt3<N>
[−]
Returns the infimum of this value and another
fn sup(&self, other: &Pnt3<N>) -> Pnt3<N>
[−]
Returns the supremum of this value and another
fn partial_cmp(&self, other: &Pnt3<N>) -> POrdering
[−]
Compare self
and other
using a partial ordering relation.
fn partial_lt(&self, other: &Pnt3<N>) -> bool
[−]
Returns true
iff self
and other
are comparable and self < other
.
fn partial_le(&self, other: &Pnt3<N>) -> bool
[−]
Returns true
iff self
and other
are comparable and self <= other
.
fn partial_gt(&self, other: &Pnt3<N>) -> bool
[−]
Returns true
iff self
and other
are comparable and self > other
.
fn partial_ge(&self, other: &Pnt3<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 Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the *
operator
fn mul(self, right: N) -> Pnt3<N>
[−]
The method for the *
operator
impl<N: Copy + Div<N, Output=N>> Div<N> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the /
operator
fn div(self, right: N) -> Pnt3<N>
[−]
The method for the /
operator
impl<N: Copy + Add<N, Output=N>> Add<N> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the +
operator
fn add(self, right: N) -> Pnt3<N>
[−]
The method for the +
operator
impl<N: Copy + Sub<N, Output=N>> Sub<N> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the -
operator
fn sub(self, right: N) -> Pnt3<N>
[−]
The method for the -
operator
impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Pnt3<Nin>> for Pnt3<Nout>
[src]
impl<N> AsRef<[N; 3]> for Pnt3<N>
[src]
impl<N> AsMut<[N; 3]> for Pnt3<N>
[src]
impl<'a, N> From<&'a [N; 3]> for &'a Pnt3<N>
[src]
impl<'a, N> From<&'a mut [N; 3]> for &'a mut Pnt3<N>
[src]
impl<N> Index<usize> for Pnt3<N>
[src]
type Output = N
The returned type after indexing
fn index(&self, i: usize) -> &N
[−]
The method for the indexing (Foo[Bar]
) operation
impl<N> IndexMut<usize> for Pnt3<N>
[src]
impl<N> Shape<usize> for Pnt3<N>
[src]
impl<N: Copy> Indexable<usize, N> for Pnt3<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 Pnt3<N>
[src]
fn repeat(val: N) -> Pnt3<N>
[−]
Creates a new vector with all its components equal to a given value.
impl<N> Dim for Pnt3<N>
[src]
impl<N> PntAsVec<Vec3<N>> for Pnt3<N>
[src]
fn to_vec(self) -> Vec3<N>
[−]
Converts this point to its associated vector.
fn as_vec<'a>(&'a self) -> &'a Vec3<N>
[−]
Converts a reference to this point to a reference to its associated vector.
fn set_coords(&mut self, v: Vec3<N>)
[−]
Sets the coordinates of this point to match those of a given vector.
impl<N: Copy + Sub<N, Output=N>> Sub<Pnt3<N>> for Pnt3<N>
[src]
type Output = Vec3<N>
The resulting type after applying the -
operator
fn sub(self, right: Pnt3<N>) -> Vec3<N>
[−]
The method for the -
operator
impl<N: Neg<Output=N> + Copy> Neg for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the -
operator
fn neg(self) -> Pnt3<N>
[−]
The method for the unary -
operator
impl<N: Copy + Add<N, Output=N>> Add<Vec3<N>> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the +
operator
fn add(self, right: Vec3<N>) -> Pnt3<N>
[−]
The method for the +
operator
impl<N: Copy + Sub<N, Output=N>> Sub<Vec3<N>> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the -
operator
fn sub(self, right: Vec3<N>) -> Pnt3<N>
[−]
The method for the -
operator
impl<N: ApproxEq<N>> ApproxEq<N> for Pnt3<N>
[src]
fn approx_epsilon(_: Option<Pnt3<N>>) -> N
[−]
Default epsilon for approximation.
fn approx_ulps(_: Option<Pnt3<N>>) -> u32
[−]
Default ULPs for approximation.
fn approx_eq(&self, other: &Pnt3<N>) -> bool
[−]
Tests approximate equality.
fn approx_eq_eps(&self, other: &Pnt3<N>, eps: &N) -> bool
[−]
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Pnt3<N>, ulps: u32) -> bool
[−]
Tests approximate equality using units in the last place (ULPs)
impl<N> FromIterator<N> for Pnt3<N>
[src]
fn from_iter<I: IntoIterator<Item=N>>(iterator: I) -> Pnt3<N>
[−]
Creates a value from an iterator. Read more
impl<N: Bounded> Bounded for Pnt3<N>
[src]
impl<N: Axpy<N>> Axpy<N> for Pnt3<N>
[src]
impl<N> Iterable<N> for Pnt3<N>
[src]
impl<N> IterableMut<N> for Pnt3<N>
[src]
impl<N: Copy + One + Zero> ToHomogeneous<Pnt4<N>> for Pnt3<N>
[src]
fn to_homogeneous(&self) -> Pnt4<N>
[−]
Gets the homogeneous coordinates form of this object.
impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Pnt4<N>> for Pnt3<N>
[src]
impl<N> NumPnt<N, Vec3<N>> for Pnt3<N> where N: BaseNum
[src]
impl<N> FloatPnt<N, Vec3<N>> for Pnt3<N> where N: BaseFloat + ApproxEq<N>
[src]
fn sqdist(&self, other: &Self) -> N
[−]
Computes the square distance between two points.
fn dist(&self, other: &Self) -> N
[−]
Computes the distance between two points.
impl<N: Rand> Rand for Pnt3<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Pnt3<N>
[−]
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: BaseNum + Neg<Output=N>> Mul<UnitQuat<N>> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the *
operator
fn mul(self, right: UnitQuat<N>) -> Pnt3<N>
[−]
The method for the *
operator
impl<N: BaseNum> Mul<Rot3<N>> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the *
operator
fn mul(self, right: Rot3<N>) -> Pnt3<N>
[−]
The method for the *
operator
impl<N: BaseNum> Mul<Iso3<N>> for Pnt3<N>
[src]
type Output = Pnt3<N>
The resulting type after applying the *
operator
fn mul(self, right: Iso3<N>) -> Pnt3<N>
[−]
The method for the *
operator