Struct nalgebra::geometry::PointBase [] [src]

#[repr(C)]
pub struct PointBase<N: Scalar, D: DimName, S: Storage<N, D, U1>> { pub coords: ColumnVector<N, D, S>, }

A point in a n-dimensional euclidean space.

Fields

The coordinates of this point, i.e., the shift from the origin.

Methods

impl<N: Scalar, D: DimName, S: Storage<N, D, U1>> PointBase<N, D, S>
[src]

Creates a new point with the given coordinates.

impl<N: Scalar, D: DimName, S: Storage<N, D, U1>> PointBase<N, D, S>
[src]

Moves this point into one that owns its data.

Clones this point into one that owns its data.

The dimension of this point.

The stride of this point. This is the number of buffer element separating each component of this point.

Iterates through this point coordinates.

Gets a reference to i-th element of this point without bound-checking.

Converts this point into a vector in homogeneous coordinates, i.e., appends a 1 at the end of it.

impl<N: Scalar, D: DimName, S: StorageMut<N, D, U1>> PointBase<N, D, S>
[src]

Mutably iterates through this point coordinates.

Gets a mutable reference to i-th element of this point without bound-checking.

Swaps two entries without bound-checking.

impl<N, D: DimName, S> PointBase<N, D, S> where
    N: Scalar,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

Creates a new point with uninitialized coordinates.

Creates a new point with all coordinates equal to zero.

Creates a new point from its homogeneous vector representation.

In practice, this builds a D-dimensional points with the same first D component as v divided by the last component of v. Returns None if this divisor is zero.

impl<N, S> PointBase<N, U1, S> where
    N: Scalar,
    S: OwnedStorage<N, U1, U1>,
    S::Alloc: OwnedAllocator<N, U1, U1, S>, 
[src]

Initializes this matrix from its components.

impl<N, S> PointBase<N, U2, S> where
    N: Scalar,
    S: OwnedStorage<N, U2, U1>,
    S::Alloc: OwnedAllocator<N, U2, U1, S>, 
[src]

Initializes this matrix from its components.

impl<N, S> PointBase<N, U3, S> where
    N: Scalar,
    S: OwnedStorage<N, U3, U1>,
    S::Alloc: OwnedAllocator<N, U3, U1, S>, 
[src]

Initializes this matrix from its components.

impl<N, S> PointBase<N, U4, S> where
    N: Scalar,
    S: OwnedStorage<N, U4, U1>,
    S::Alloc: OwnedAllocator<N, U4, U1, S>, 
[src]

Initializes this matrix from its components.

impl<N, S> PointBase<N, U5, S> where
    N: Scalar,
    S: OwnedStorage<N, U5, U1>,
    S::Alloc: OwnedAllocator<N, U5, U1, S>, 
[src]

Initializes this matrix from its components.

impl<N, S> PointBase<N, U6, S> where
    N: Scalar,
    S: OwnedStorage<N, U6, U1>,
    S::Alloc: OwnedAllocator<N, U6, U1, S>, 
[src]

Initializes this matrix from its components.

Trait Implementations

impl<N: Hash + Scalar, D: Hash + DimName, S: Hash + Storage<N, D, U1>> Hash for PointBase<N, D, S>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<N: Debug + Scalar, D: Debug + DimName, S: Debug + Storage<N, D, U1>> Debug for PointBase<N, D, S>
[src]

Formats the value using the given formatter.

impl<N, D, S> Copy for PointBase<N, D, S> where
    N: Scalar,
    D: DimName,
    S: Storage<N, D, U1> + Copy
[src]

impl<N, D, S> Clone for PointBase<N, D, S> where
    N: Scalar,
    D: DimName,
    S: Storage<N, D, U1> + Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<N, D: DimName, S> ApproxEq for PointBase<N, D, S> where
    N: Scalar + ApproxEq,
    S: Storage<N, D, U1>,
    N::Epsilon: Copy
[src]

Used for specifying relative comparisons.

The default tolerance to use when testing values that are close together. Read more

The default relative tolerance for testing values that are far-apart. Read more

The default ULPs to tolerate when testing values that are far-apart. Read more

A test for equality that uses a relative comparison if the values are far apart.

A test for equality that uses units in the last place (ULP) if the values are far apart.

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<N, D: DimName, S> Eq for PointBase<N, D, S> where
    N: Scalar + Eq,
    S: Storage<N, D, U1>, 
[src]

impl<N, D: DimName, S> PartialEq for PointBase<N, D, S> where
    N: Scalar,
    S: Storage<N, D, U1>, 
[src]

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

This method tests for !=.

impl<N, D: DimName, S> PartialOrd for PointBase<N, D, S> where
    N: Scalar + PartialOrd,
    S: Storage<N, D, U1>, 
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<N, D: DimName, S> Display for PointBase<N, D, S> where
    N: Scalar + Display,
    S: Storage<N, D, U1>, 
[src]

Formats the value using the given formatter. Read more

impl<N, D: DimName, S> Bounded for PointBase<N, D, S> where
    N: Scalar + Bounded,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

returns the largest finite number this type can represent

returns the smallest finite number this type can represent

impl<N, D: DimName, S> Rand for PointBase<N, D, S> where
    N: Scalar + Rand,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

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

impl<N, D: DimName, S> Index<usize> for PointBase<N, D, S> where
    N: Scalar,
    S: Storage<N, D, U1>, 
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<N, D: DimName, S> IndexMut<usize> for PointBase<N, D, S> where
    N: Scalar,
    S: StorageMut<N, D, U1>, 
[src]

The method for the mutable indexing (container[index]) operation

impl<N, D: DimName, S> Neg for PointBase<N, D, S> where
    N: Scalar + ClosedNeg,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, N, D: DimName, S> Neg for &'a PointBase<N, D, S> where
    N: Scalar + ClosedNeg,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, 'b, N, D: DimName, SA, SB> Sub<&'b PointBase<N, D, SB>> for &'a PointBase<N, D, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D, U1>,
    SB: Storage<N, D, U1>,
    SA::Alloc: SameShapeAllocator<N, D, U1, D, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, N, D: DimName, SA, SB> Sub<PointBase<N, D, SA>> for &'a PointBase<N, D, SB> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D, U1>,
    SB: Storage<N, D, U1>,
    SA::Alloc: SameShapeAllocator<N, D, U1, D, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'b, N, D: DimName, SA, SB> Sub<&'b PointBase<N, D, SB>> for PointBase<N, D, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D, U1>,
    SB: Storage<N, D, U1>,
    SA::Alloc: SameShapeAllocator<N, D, U1, D, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N, D: DimName, SA, SB> Sub<PointBase<N, D, SB>> for PointBase<N, D, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D, U1>,
    SB: Storage<N, D, U1>,
    SA::Alloc: SameShapeAllocator<N, D, U1, D, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b, N, D1: DimName, D2: Dim, SA, SB> Sub<&'b ColumnVector<N, D2, SB>> for &'a PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, N, D1: DimName, D2: Dim, SA, SB> Sub<ColumnVector<N, D2, SB>> for &'a PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'b, N, D1: DimName, D2: Dim, SA, SB> Sub<&'b ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<N, D1: DimName, D2: Dim, SA, SB> Sub<ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b, N, D1: DimName, D2: Dim, SA, SB> Add<&'b ColumnVector<N, D2, SB>> for &'a PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, N, D1: DimName, D2: Dim, SA, SB> Add<ColumnVector<N, D2, SB>> for &'a PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'b, N, D1: DimName, D2: Dim, SA, SB> Add<&'b ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<N, D1: DimName, D2: Dim, SA, SB> Add<ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: Storage<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    SA::Alloc: SameShapeAllocator<N, D1, U1, D2, U1, SA>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'b, N, D1: DimName, D2: Dim, SA, SB> AddAssign<&'b ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: StorageMut<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

The method for the += operator

impl<N, D1: DimName, D2: Dim, SA, SB> AddAssign<ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedAdd,
    SA: StorageMut<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

The method for the += operator

impl<'b, N, D1: DimName, D2: Dim, SA, SB> SubAssign<&'b ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: StorageMut<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

The method for the -= operator

impl<N, D1: DimName, D2: Dim, SA, SB> SubAssign<ColumnVector<N, D2, SB>> for PointBase<N, D1, SA> where
    N: Scalar + ClosedSub,
    SA: StorageMut<N, D1, U1>,
    SB: Storage<N, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

The method for the -= operator

impl<N, D: DimName, S> Mul<N> for PointBase<N, D, S> where
    N: Scalar + ClosedMul,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, N, D: DimName, S> Mul<N> for &'a PointBase<N, D, S> where
    N: Scalar + ClosedMul,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<N, D: DimName, S> MulAssign<N> for PointBase<N, D, S> where
    N: Scalar + ClosedMul,
    S: StorageMut<N, D, U1>, 
[src]

The method for the *= operator

impl<N, D: DimName, S> Div<N> for PointBase<N, D, S> where
    N: Scalar + ClosedDiv,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, N, D: DimName, S> Div<N> for &'a PointBase<N, D, S> where
    N: Scalar + ClosedDiv,
    S: Storage<N, D, U1>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<N, D: DimName, S> DivAssign<N> for PointBase<N, D, S> where
    N: Scalar + ClosedDiv,
    S: StorageMut<N, D, U1>, 
[src]

The method for the /= operator

impl<N, D: DimName, S> AffineSpace for PointBase<N, D, S> where
    N: Scalar + Field,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

The associated vector space.

Same as *self + *t. Applies the additive group action of this affine space's associated vector space on self. Read more

Same as *self - *other. Returns the unique element v of the associated vector space such that self = right + v. Read more

impl<N, D: DimName, S> EuclideanSpace for PointBase<N, D, S> where
    N: Real,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

The underlying finite vector space.

The underlying reals.

The preferred origin of this euclidean space. Read more

The coordinates of this point, i.e., the translation from the origin.

Builds a point from its coordinates relative to the origin.

Multiplies the distance of this point to Self::origin() by s. Read more

The distance between two points.

The distance between two points.

impl<N, D: DimName, S> MeetSemilattice for PointBase<N, D, S> where
    N: Scalar + MeetSemilattice,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

Returns the meet (aka. infimum) of two values.

impl<N, D: DimName, S> JoinSemilattice for PointBase<N, D, S> where
    N: Scalar + JoinSemilattice,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

Returns the join (aka. supremum) of two values.

impl<N, D: DimName, S> Lattice for PointBase<N, D, S> where
    N: Scalar + Lattice,
    S: OwnedStorage<N, D, U1>,
    S::Alloc: OwnedAllocator<N, D, U1, S>, 
[src]

Returns the infimum and the supremum simultaneously.

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

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

Sorts two values in increasing order using a partial ordering.

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

impl<N1, N2, D, SA, SB> SubsetOf<PointBase<N2, D, SB>> for PointBase<N1, D, SA> where
    D: DimName,
    N1: Scalar,
    N2: Scalar + SupersetOf<N1>,
    SA: OwnedStorage<N1, D, U1>,
    SB: OwnedStorage<N2, D, U1>,
    SB::Alloc: OwnedAllocator<N2, D, U1, SB>,
    SA::Alloc: OwnedAllocator<N1, D, U1, SA>, 
[src]

The inclusion map: converts self to the equivalent element of its superset.

Checks if element is actually part of the subset Self (and can be converted to it).

Use with care! Same as self.to_superset but without any property checks. Always succeeds.

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

impl<N1, N2, D, SA, SB> SubsetOf<ColumnVector<N2, DimNameSum<D, U1>, SB>> for PointBase<N1, D, SA> where
    D: DimNameAdd<U1>,
    N1: Scalar,
    N2: Scalar + Zero + One + ClosedDiv + SupersetOf<N1>,
    SA: OwnedStorage<N1, D, U1>,
    SB: OwnedStorage<N2, DimNameSum<D, U1>, U1>,
    SA::Alloc: OwnedAllocator<N1, D, U1, SA> + Allocator<N1, DimNameSum<D, U1>, U1>,
    SB::Alloc: OwnedAllocator<N2, DimNameSum<D, U1>, U1, SB> + Allocator<N2, D, U1>, 
[src]

The inclusion map: converts self to the equivalent element of its superset.

Checks if element is actually part of the subset Self (and can be converted to it).

Use with care! Same as self.to_superset but without any property checks. Always succeeds.

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

impl<N: Scalar, S> Deref for PointBase<N, U1, S> where
    S: OwnedStorage<N, U1, U1>,
    S::Alloc: OwnedAllocator<N, U1, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U1, S> where
    S: OwnedStorage<N, U1, U1>,
    S::Alloc: OwnedAllocator<N, U1, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N: Scalar, S> Deref for PointBase<N, U2, S> where
    S: OwnedStorage<N, U2, U1>,
    S::Alloc: OwnedAllocator<N, U2, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U2, S> where
    S: OwnedStorage<N, U2, U1>,
    S::Alloc: OwnedAllocator<N, U2, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N: Scalar, S> Deref for PointBase<N, U3, S> where
    S: OwnedStorage<N, U3, U1>,
    S::Alloc: OwnedAllocator<N, U3, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U3, S> where
    S: OwnedStorage<N, U3, U1>,
    S::Alloc: OwnedAllocator<N, U3, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N: Scalar, S> Deref for PointBase<N, U4, S> where
    S: OwnedStorage<N, U4, U1>,
    S::Alloc: OwnedAllocator<N, U4, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U4, S> where
    S: OwnedStorage<N, U4, U1>,
    S::Alloc: OwnedAllocator<N, U4, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N: Scalar, S> Deref for PointBase<N, U5, S> where
    S: OwnedStorage<N, U5, U1>,
    S::Alloc: OwnedAllocator<N, U5, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U5, S> where
    S: OwnedStorage<N, U5, U1>,
    S::Alloc: OwnedAllocator<N, U5, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N: Scalar, S> Deref for PointBase<N, U6, S> where
    S: OwnedStorage<N, U6, U1>,
    S::Alloc: OwnedAllocator<N, U6, U1, S>, 
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<N: Scalar, S> DerefMut for PointBase<N, U6, S> where
    S: OwnedStorage<N, U6, U1>,
    S::Alloc: OwnedAllocator<N, U6, U1, S>, 
[src]

The method called to mutably dereference a value

impl<N, D: DimName, S> Axpy<N> for PointBase<N, D, S> where
    N: Scalar + Field,
    S: StorageMut<N, D, U1>, 
[src]

Computes self = a * x + self.