Struct nalgebra::Point4 [] [src]

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

Point of dimension 4.

The main differance between a point and a vector is that a vector is not affected by translations.

Fields

First component of the point.

Second component of the point.

Third component of the point.

Fourth component of the point.

Methods

impl<N> Point4<N>
[src]

Converts this point to its associated vector.

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

impl<N> Point4<N>
[src]

Creation from component values.

impl<N: Copy> Point4<N>
[src]

Unsafe read access to a vector element by index.

Unsafe write access to a vector element by index.

impl<N> Point4<N>
[src]

The dimension of this entity.

Trait Implementations

impl<N, O: Copy> Rotate<O> for Point4<N>
[src]

Applies a rotation to v.

Applies an inverse rotation to v.

impl<N: Copy> Copy for Point4<N>
[src]

impl<N: Debug> Debug for Point4<N>
[src]

Formats the value using the given formatter.

impl<N: Hash> Hash for Point4<N>
[src]

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

impl<N: Clone> Clone for Point4<N>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N: Decodable> Decodable for Point4<N>
[src]

impl<N: Encodable> Encodable for Point4<N>
[src]

impl<N: PartialEq> PartialEq for Point4<N>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<N: Eq> Eq for Point4<N>
[src]

impl<N: Zero> Origin for Point4<N>
[src]

The trivial origin.

Returns true if this points is exactly the trivial origin.

impl<N: Copy + Sub<N, Output=N>> Sub<Point4<N>> for Point4<N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N: Copy + Add<N, Output=N>> Add<Vector4<N>> for Point4<N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<N: Copy + AddAssign<N>> AddAssign<Vector4<N>> for Point4<N>
[src]

The method for the += operator

impl<N: Copy + Sub<N, Output=N>> Sub<Vector4<N>> for Point4<N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N: Copy + SubAssign<N>> SubAssign<Vector4<N>> for Point4<N>
[src]

The method for the -= operator

impl<N> PointAsVector for Point4<N>
[src]

The vector type of the vector space associated to this point's affine space.

Converts this point to its associated vector.

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

Sets the coordinates of this point to match those of a given vector.

impl<N> NumPoint<N> for Point4<N> where N: BaseNum
[src]

impl<N> FloatPoint<N> for Point4<N> where N: BaseFloat + ApproxEq<N>
[src]

Computes the square distance between two points.

Computes the distance between two points.

impl<N: Display> Display for Point4<N>
[src]

Formats the value using the given formatter.

impl<N: Copy + One + Zero> ToHomogeneous<Point5<N>> for Point4<N>
[src]

Gets the homogeneous coordinates form of this object.

impl<N: Copy + Div<N, Output=N> + One + Zero> FromHomogeneous<Point5<N>> for Point4<N>
[src]

Builds an object from its homogeneous coordinate form. Read more

impl<N: Neg<Output=N> + Copy> Neg for Point4<N>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, N> Neg for &'a Point4<N> where &'a N: Neg<Output=N>
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<N: Copy> Repeat<N> for Point4<N>
[src]

Returns a value with filled by val.

impl<N: Rand> Rand for Point4<N>
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<N: Copy + AddAssign<N>> AddAssign<N> for Point4<N>
[src]

The method for the += operator

impl<N: Copy + Add<N, Output=N>> Add<N> for Point4<N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b, N> Add<&'a N> for &'b Point4<N> where &'b N: Add<&'a N, Output=N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, N> Add<N> for &'a Point4<N> where &'a N: Add<&'b N, Output=N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, N> Add<&'a N> for Point4<N> where N: Add<&'a N, Output=N>
[src]

The resulting type after applying the + operator

The method for the + operator

impl<N: Copy + SubAssign<N>> SubAssign<N> for Point4<N>
[src]

The method for the -= operator

impl<N: Copy + Sub<N, Output=N>> Sub<N> for Point4<N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b, N> Sub<&'a N> for &'b Point4<N> where &'b N: Sub<&'a N, Output=N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, N> Sub<N> for &'a Point4<N> where &'a N: Sub<&'b N, Output=N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, N> Sub<&'a N> for Point4<N> where N: Sub<&'a N, Output=N>
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N: Copy + MulAssign<N>> MulAssign<N> for Point4<N>
[src]

The method for the *= operator

impl<N: Copy + Mul<N, Output=N>> Mul<N> for Point4<N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b, N> Mul<&'a N> for &'b Point4<N> where &'b N: Mul<&'a N, Output=N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, N> Mul<N> for &'a Point4<N> where &'a N: Mul<&'b N, Output=N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, N> Mul<&'a N> for Point4<N> where N: Mul<&'a N, Output=N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N: Copy + DivAssign<N>> DivAssign<N> for Point4<N>
[src]

The method for the /= operator

impl<N: Copy + Div<N, Output=N>> Div<N> for Point4<N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b, N> Div<&'a N> for &'b Point4<N> where &'b N: Div<&'a N, Output=N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, N> Div<N> for &'a Point4<N> where &'a N: Div<&'b N, Output=N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, N> Div<&'a N> for Point4<N> where N: Div<&'a N, Output=N>
[src]

The resulting type after applying the / operator

The method for the / operator

impl<N: BaseFloat> PartialOrder for Point4<N>
[src]

Returns the infimum of this value and another

Returns the supremum of this value and another

Compare self and other using a partial ordering relation.

Returns true iff self and other are comparable and self < other.

Returns true iff self and other are comparable and self <= other.

Returns true iff self and other are comparable and self > other.

Returns true iff self and other are comparable and self >= other.

Return the minimum of self and other if they are comparable.

Return the maximum of self and other if they are comparable.

Clamp value between min and max. Returns None if value is not comparable to min or max. Read more

impl<Nin: Copy, Nout: Copy + Cast<Nin>> Cast<Point4<Nin>> for Point4<Nout>
[src]

Converts an element of type T to an element of type Self.

impl<N: ApproxEq<N>> ApproxEq<N> for Point4<N>
[src]

Default epsilon for approximation.

Default ULPs for approximation.

Tests approximate equality.

Tests approximate equality using a custom epsilon.

Tests approximate equality using units in the last place (ULPs)

impl<N: Axpy<N>> Axpy<N> for Point4<N>
[src]

Adds $$a * x$$ to self.

impl<N: Bounded> Bounded for Point4<N>
[src]

The maximum value.

The minimum value.

impl<N> AsRef<[N; 4]> for Point4<N>
[src]

Performs the conversion.

impl<N> AsMut<[N; 4]> for Point4<N>
[src]

Performs the conversion.

impl<'a, N> From<&'a [N; 4]> for &'a Point4<N>
[src]

Performs the conversion.

impl<'a, N> From<&'a mut [N; 4]> for &'a mut Point4<N>
[src]

Performs the conversion.

impl<'a, N: Clone> From<&'a [N; 4]> for Point4<N>
[src]

Performs the conversion.

impl<N> Dimension for Point4<N>
[src]

The dimension of the object.

impl<N> Shape<usize> for Point4<N>
[src]

Returns the shape of an indexable object.

impl<N: Copy> Indexable<usize, N> for Point4<N>
[src]

Swaps the i-th element of self with its j-th element.

Reads the i-th element of self. Read more

Writes to the i-th element of self. Read more

impl<N, T> Index<T> for Point4<N> where [N]: Index<T>
[src]

The returned type after indexing

The method for the indexing (Foo[Bar]) operation

impl<N, T> IndexMut<T> for Point4<N> where [N]: IndexMut<T>
[src]

The method for the indexing (Foo[Bar]) operation

impl<N> Iterable<N> for Point4<N>
[src]

Gets a vector-like read-only iterator.

impl<N> IterableMut<N> for Point4<N>
[src]

Gets a vector-like read-write iterator.

impl<N> FromIterator<N> for Point4<N>
[src]

Creates a value from an iterator. Read more

impl<N: Copy + BaseNum> Mul<Matrix4<N>> for Point4<N>
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N: Copy + BaseNum> MulAssign<Matrix4<N>> for Point4<N>
[src]

The method for the *= operator