Struct nalgebra::Pnt4 [] [src]

pub struct Pnt4<N> {
    pub x: N,
    pub y: N,
    pub z: N,
    pub w: N,
}

Point of dimension 4.

Fields

x

First component of the point.

y

Second component of the point.

z

Third component of the point.

w

Fourth component of the point.

Methods

impl<N> Pnt4<N>

fn new(x: N, y: N, z: N, w: N) -> Pnt4<N>

Creates a new vector.

impl<N> Pnt4<N>

fn as_array(&self) -> &[N; 4]

View this vector as an array.

fn as_array_mut(&mut self) -> &mut [N; 4]

View this vector as a mutable array.

fn from_array_ref(array: &[N; 4]) -> &Pnt4<N>

View an array as a vector.

fn from_array_mut(array: &mut [N; 4]) -> &mut Pnt4<N>

View an array as a vector.

impl<N: Copy> Pnt4<N>

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> Pnt4<N>

fn len(&self) -> usize

impl<N> Pnt4<N>

fn to_vec(self) -> Vec4<N>

Converts this point to its associated vector.

fn as_vec<'a>(&'a self) -> &'a Vec4<N>

Converts a reference to this point to a reference to its associated vector.

Trait Implementations

impl<N, O: Copy> Rotate<O> for Pnt4<N>

fn rotate(&self, other: &O) -> O

fn inv_rotate(&self, other: &O) -> O

impl<N: Zero> Orig for Pnt4<N>

fn orig() -> Pnt4<N>

fn is_orig(&self) -> bool

impl<N: BaseFloat> POrd for Pnt4<N>

fn inf(&self, other: &Pnt4<N>) -> Pnt4<N>

fn sup(&self, other: &Pnt4<N>) -> Pnt4<N>

fn partial_cmp(&self, other: &Pnt4<N>) -> POrdering

fn partial_lt(&self, other: &Pnt4<N>) -> bool

fn partial_le(&self, other: &Pnt4<N>) -> bool

fn partial_gt(&self, other: &Pnt4<N>) -> bool

fn partial_ge(&self, other: &Pnt4<N>) -> bool

fn partial_min<'a>(&'a self, other: &'a Self) -> Option<&'a Self>

fn partial_max<'a>(&'a self, other: &'a Self) -> Option<&'a Self>

fn partial_clamp<'a>(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>

impl<N: Copy + Mul<N, Output=N>> Mul<N> for Pnt4<N>

type Output = Pnt4<N>

fn mul(self, right: N) -> Pnt4<N>

impl<N: Copy + Div<N, Output=N>> Div<N> for Pnt4<N>

type Output = Pnt4<N>

fn div(self, right: N) -> Pnt4<N>

impl<N: Copy + Add<N, Output=N>> Add<N> for Pnt4<N>

type Output = Pnt4<N>

fn add(self, right: N) -> Pnt4<N>

impl<N: Copy + Sub<N, Output=N>> Sub<N> for Pnt4<N>

type Output = Pnt4<N>

fn sub(self, right: N) -> Pnt4<N>

impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Pnt4<Nin>> for Pnt4<Nout>

fn from(v: Pnt4<Nin>) -> Pnt4<Nout>

impl<N> Index<usize> for Pnt4<N>

type Output = N

fn index(&self, i: usize) -> &N

impl<N> IndexMut<usize> for Pnt4<N>

fn index_mut(&mut self, i: usize) -> &mut N

impl<N> Shape<usize> for Pnt4<N>

fn shape(&self) -> usize

impl<N: Copy> Indexable<usize, N> for Pnt4<N>

fn swap(&mut self, i1: usize, i2: usize)

unsafe fn unsafe_at(&self, i: usize) -> N

unsafe fn unsafe_set(&mut self, i: usize, val: N)

impl<N: Copy> Repeat<N> for Pnt4<N>

fn repeat(val: N) -> Pnt4<N>

impl<N> Dim for Pnt4<N>

fn dim(_: Option<Pnt4<N>>) -> usize

impl<N> PntAsVec<Vec4<N>> for Pnt4<N>

fn to_vec(self) -> Vec4<N>

fn as_vec<'a>(&'a self) -> &'a Vec4<N>

fn set_coords(&mut self, v: Vec4<N>)

impl<N: Copy + Sub<N, Output=N>> Sub<Pnt4<N>> for Pnt4<N>

type Output = Vec4<N>

fn sub(self, right: Pnt4<N>) -> Vec4<N>

impl<N: Neg<Output=N> + Copy> Neg for Pnt4<N>

type Output = Pnt4<N>

fn neg(self) -> Pnt4<N>

impl<N: Copy + Add<N, Output=N>> Add<Vec4<N>> for Pnt4<N>

type Output = Pnt4<N>

fn add(self, right: Vec4<N>) -> Pnt4<N>

impl<N: Copy + Sub<N, Output=N>> Sub<Vec4<N>> for Pnt4<N>

type Output = Pnt4<N>

fn sub(self, right: Vec4<N>) -> Pnt4<N>

impl<N: ApproxEq<N>> ApproxEq<N> for Pnt4<N>

fn approx_epsilon(_: Option<Pnt4<N>>) -> N

fn approx_ulps(_: Option<Pnt4<N>>) -> u32

fn approx_eq(&self, other: &Pnt4<N>) -> bool

fn approx_eq_eps(&self, other: &Pnt4<N>, eps: &N) -> bool

fn approx_eq_ulps(&self, other: &Pnt4<N>, ulps: u32) -> bool

impl<N> FromIterator<N> for Pnt4<N>

fn from_iter<I: IntoIterator<Item=N>>(iterator: I) -> Pnt4<N>

impl<N: Bounded> Bounded for Pnt4<N>

fn max_value() -> Pnt4<N>

fn min_value() -> Pnt4<N>

impl<N: Axpy<N>> Axpy<N> for Pnt4<N>

fn axpy(&mut self, a: &N, x: &Pnt4<N>)

impl<N> Iterable<N> for Pnt4<N>

fn iter<'l>(&'l self) -> Iter<'l, N>

impl<N> IterableMut<N> for Pnt4<N>

fn iter_mut<'l>(&'l mut self) -> IterMut<'l, N>

impl<N: Copy + One + Zero> ToHomogeneous<Pnt5<N>> for Pnt4<N>

fn to_homogeneous(&self) -> Pnt5<N>

impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Pnt5<N>> for Pnt4<N>

fn from(v: &Pnt5<N>) -> Pnt4<N>

impl<N> NumPnt<N, Vec4<N>> for Pnt4<N> where N: BaseNum

impl<N> FloatPnt<N, Vec4<N>> for Pnt4<N> where N: BaseFloat + ApproxEq<N>

fn sqdist(&self, other: &Self) -> N

fn dist(&self, other: &Self) -> N

impl<N: Rand> Rand for Pnt4<N>

fn rand<R: Rng>(rng: &mut R) -> Pnt4<N>

impl<N: Copy + BaseNum> Mul<Mat4<N>> for Pnt4<N>

type Output = Pnt4<N>

fn mul(self, right: Mat4<N>) -> Pnt4<N>

impl<N: BaseNum> Mul<Rot4<N>> for Pnt4<N>

type Output = Pnt4<N>

fn mul(self, right: Rot4<N>) -> Pnt4<N>

impl<N: BaseNum> Mul<Iso4<N>> for Pnt4<N>

type Output = Pnt4<N>

fn mul(self, right: Iso4<N>) -> Pnt4<N>

Derived Implementations

impl<N: Copy> Copy for Pnt4<N>

impl<N: Debug> Debug for Pnt4<N>

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl<N: Hash> Hash for Pnt4<N>

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<N: Clone> Clone for Pnt4<N>

fn clone(&self) -> Pnt4<N>

fn clone_from(&mut self, source: &Self)

impl<N: Decodable> Decodable for Pnt4<N>

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Pnt4<N>, __D::Error>

impl<N: Encodable> Encodable for Pnt4<N>

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl<N: PartialEq> PartialEq for Pnt4<N>

fn eq(&self, __arg_0: &Pnt4<N>) -> bool

fn ne(&self, __arg_0: &Pnt4<N>) -> bool

impl<N: Eq> Eq for Pnt4<N>