Struct nalgebra::geometry::Point [] [src]

#[repr(C)]
pub struct Point<N: Scalar, D: DimName> where
    DefaultAllocator: Allocator<N, D>, 
{ pub coords: VectorN<N, D>, }

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> Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Clones this point into one that owns its data.

[src]

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

[src]

Creates a new point with the given coordinates.

[src]

The dimension of this point.

[src]

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

[src]

Iterates through this point coordinates.

[src]

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

[src]

Mutably iterates through this point coordinates.

[src]

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

[src]

Swaps two entries without bound-checking.

impl<N: Scalar, D: DimName> Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Creates a new point with uninitialized coordinates.

[src]

Creates a new point with all coordinates equal to zero.

[src]

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: Scalar> Point<N, U1> where
    DefaultAllocator: Allocator<N, U1>, 
[src]

[src]

Initializes this matrix from its components.

impl<N: Scalar> Point<N, U2> where
    DefaultAllocator: Allocator<N, U2>, 
[src]

[src]

Initializes this matrix from its components.

impl<N: Scalar> Point<N, U3> where
    DefaultAllocator: Allocator<N, U3>, 
[src]

[src]

Initializes this matrix from its components.

impl<N: Scalar> Point<N, U4> where
    DefaultAllocator: Allocator<N, U4>, 
[src]

[src]

Initializes this matrix from its components.

impl<N: Scalar> Point<N, U5> where
    DefaultAllocator: Allocator<N, U5>, 
[src]

[src]

Initializes this matrix from its components.

impl<N: Scalar> Point<N, U6> where
    DefaultAllocator: Allocator<N, U6>, 
[src]

[src]

Initializes this matrix from its components.

Trait Implementations

impl<N: Debug + Scalar, D: Debug + DimName> Debug for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Formats the value using the given formatter.

impl<N: Scalar + Hash, D: DimName + Hash> Hash for Point<N, D> where
    DefaultAllocator: Allocator<N, D>,
    <DefaultAllocator as Allocator<N, D>>::Buffer: Hash
[src]

[src]

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

1.3.0
[src]

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

impl<N: Scalar, D: DimName> Copy for Point<N, D> where
    DefaultAllocator: Allocator<N, D>,
    <DefaultAllocator as Allocator<N, D>>::Buffer: Copy
[src]

impl<N: Scalar, D: DimName> Clone for Point<N, D> where
    DefaultAllocator: Allocator<N, D>,
    <DefaultAllocator as Allocator<N, D>>::Buffer: Clone
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<N: Scalar + ApproxEq, D: DimName> ApproxEq for Point<N, D> where
    DefaultAllocator: Allocator<N, D>,
    N::Epsilon: Copy
[src]

Used for specifying relative comparisons.

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

The inverse of ApproxEq::relative_eq.

[src]

The inverse of ApproxEq::ulps_eq.

impl<N: Scalar + Eq, D: DimName> Eq for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

impl<N: Scalar, D: DimName> PartialEq for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl<N: Scalar + PartialOrd, D: DimName> PartialOrd for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

impl<N: Scalar + Display, D: DimName> Display for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Formats the value using the given formatter. Read more

impl<N: Scalar + Bounded, D: DimName> Bounded for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

returns the largest finite number this type can represent

[src]

returns the smallest finite number this type can represent

impl<N: Scalar + Rand, D: DimName> Rand for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

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

impl<N: Scalar, D: DimName> Index<usize> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

impl<N: Scalar, D: DimName> IndexMut<usize> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Performs the mutable indexing (container[index]) operation.

impl<N: Scalar + ClosedNeg, D: DimName> Neg for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a, N: Scalar + ClosedNeg, D: DimName> Neg for &'a Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a, 'b, N, D: DimName> Sub<&'b Point<N, D>> for &'a Point<N, D> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D, U1> + Allocator<N, D, U1> + SameShapeAllocator<N, D, U1, D, U1>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, N, D: DimName> Sub<Point<N, D>> for &'a Point<N, D> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D, U1> + Allocator<N, D, U1> + SameShapeAllocator<N, D, U1, D, U1>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'b, N, D: DimName> Sub<&'b Point<N, D>> for Point<N, D> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D, U1> + Allocator<N, D, U1> + SameShapeAllocator<N, D, U1, D, U1>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<N, D: DimName> Sub<Point<N, D>> for Point<N, D> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D, U1> + Allocator<N, D, U1> + SameShapeAllocator<N, D, U1, D, U1>,
    ShapeConstraint: SameNumberOfRows<D, D> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'a, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<Vector<N, D2, SB>> for &'a Point<N, D1> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<&'b Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Sub<Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedSub,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<Vector<N, D2, SB>> for &'a Point<N, D1> where
    N: Scalar + ClosedAdd,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'b, N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<&'b Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedAdd,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<N, D1: DimName, D2: Dim, SB: Storage<N, D2>> Add<Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedAdd,
    DefaultAllocator: Allocator<N, D1, U1> + Allocator<N, D2, U1> + SameShapeAllocator<N, D1, U1, D2, U1>,
    ShapeConstraint: SameNumberOfRows<D1, D2, Representative = D1> + SameNumberOfColumns<U1, U1>, 
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'b, N, D1: DimName, D2: Dim, SB> AddAssign<&'b Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedAdd,
    SB: Storage<N, D2>,
    DefaultAllocator: Allocator<N, D1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

[src]

Performs the += operation.

impl<N, D1: DimName, D2: Dim, SB> AddAssign<Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedAdd,
    SB: Storage<N, D2>,
    DefaultAllocator: Allocator<N, D1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

[src]

Performs the += operation.

impl<'b, N, D1: DimName, D2: Dim, SB> SubAssign<&'b Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedSub,
    SB: Storage<N, D2>,
    DefaultAllocator: Allocator<N, D1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

[src]

Performs the -= operation.

impl<N, D1: DimName, D2: Dim, SB> SubAssign<Vector<N, D2, SB>> for Point<N, D1> where
    N: Scalar + ClosedSub,
    SB: Storage<N, D2>,
    DefaultAllocator: Allocator<N, D1>,
    ShapeConstraint: SameNumberOfRows<D1, D2>, 
[src]

[src]

Performs the -= operation.

impl<N: Scalar + ClosedMul, D: DimName> Mul<N> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, N: Scalar + ClosedMul, D: DimName> Mul<N> for &'a Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<N: Scalar + ClosedMul, D: DimName> MulAssign<N> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Performs the *= operation.

impl<N: Scalar + ClosedDiv, D: DimName> Div<N> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<'a, N: Scalar + ClosedDiv, D: DimName> Div<N> for &'a Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl<N: Scalar + ClosedDiv, D: DimName> DivAssign<N> for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Performs the /= operation.

impl<N: Scalar + Field, D: DimName> AffineSpace for Point<N, D> where
    N: Scalar + Field,
    DefaultAllocator: Allocator<N, D>, 
[src]

The associated vector space.

[src]

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

[src]

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

impl<N: Real, D: DimName> EuclideanSpace for Point<N, D> where
    DefaultAllocator: Allocator<N, D>, 
[src]

The underlying finite vector space.

The underlying reals.

[src]

The preferred origin of this euclidean space. Read more

[src]

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

[src]

Builds a point from its coordinates relative to the origin.

[src]

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

[src]

The distance between two points.

[src]

The distance between two points.

impl<N, D: DimName> MeetSemilattice for Point<N, D> where
    N: Scalar + MeetSemilattice,
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

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

impl<N, D: DimName> JoinSemilattice for Point<N, D> where
    N: Scalar + JoinSemilattice,
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

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

impl<N, D: DimName> Lattice for Point<N, D> where
    N: Scalar + Lattice,
    DefaultAllocator: Allocator<N, D>, 
[src]

[src]

Returns the infimum and the supremum simultaneously.

[src]

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

[src]

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

[src]

Sorts two values in increasing order using a partial ordering.

[src]

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

impl<N1, N2, D> SubsetOf<Point<N2, D>> for Point<N1, D> where
    D: DimName,
    N1: Scalar,
    N2: Scalar + SupersetOf<N1>,
    DefaultAllocator: Allocator<N2, D> + Allocator<N1, D>, 
[src]

[src]

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

[src]

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

[src]

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

[src]

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

impl<N1, N2, D> SubsetOf<VectorN<N2, DimNameSum<D, U1>>> for Point<N1, D> where
    D: DimNameAdd<U1>,
    N1: Scalar,
    N2: Scalar + Zero + One + ClosedDiv + SupersetOf<N1>,
    DefaultAllocator: Allocator<N1, D> + Allocator<N1, DimNameSum<D, U1>> + Allocator<N2, DimNameSum<D, U1>> + Allocator<N2, D>, 
[src]

[src]

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

[src]

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

[src]

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

[src]

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

impl<N: Scalar> Deref for Point<N, U1> where
    DefaultAllocator: Allocator<N, U1>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U1> where
    DefaultAllocator: Allocator<N, U1>, 
[src]

[src]

Mutably dereferences the value.

impl<N: Scalar> Deref for Point<N, U2> where
    DefaultAllocator: Allocator<N, U2>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U2> where
    DefaultAllocator: Allocator<N, U2>, 
[src]

[src]

Mutably dereferences the value.

impl<N: Scalar> Deref for Point<N, U3> where
    DefaultAllocator: Allocator<N, U3>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U3> where
    DefaultAllocator: Allocator<N, U3>, 
[src]

[src]

Mutably dereferences the value.

impl<N: Scalar> Deref for Point<N, U4> where
    DefaultAllocator: Allocator<N, U4>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U4> where
    DefaultAllocator: Allocator<N, U4>, 
[src]

[src]

Mutably dereferences the value.

impl<N: Scalar> Deref for Point<N, U5> where
    DefaultAllocator: Allocator<N, U5>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U5> where
    DefaultAllocator: Allocator<N, U5>, 
[src]

[src]

Mutably dereferences the value.

impl<N: Scalar> Deref for Point<N, U6> where
    DefaultAllocator: Allocator<N, U6>, 
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<N: Scalar> DerefMut for Point<N, U6> where
    DefaultAllocator: Allocator<N, U6>, 
[src]

[src]

Mutably dereferences the value.