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
coords: VectorN<N, D>
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]
DefaultAllocator: Allocator<N, D>,
fn clone(&self) -> Point<N, D>
[src]
Clones this point into one that owns its data.
fn to_homogeneous(&self) -> VectorN<N, DimNameSum<D, U1>> where
N: One,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<N, DimNameSum<D, U1>>,
[src]
N: One,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<N, DimNameSum<D, U1>>,
Converts this point into a vector in homogeneous coordinates, i.e., appends a 1
at the
end of it.
fn from_coordinates(coords: VectorN<N, D>) -> Point<N, D>
[src]
Creates a new point with the given coordinates.
fn len(&self) -> usize
[src]
The dimension of this point.
fn stride(&self) -> usize
[src]
The stride of this point. This is the number of buffer element separating each component of this point.
fn iter(
&self
) -> MatrixIter<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>
[src]
&self
) -> MatrixIter<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>
Iterates through this point coordinates.
unsafe fn get_unchecked(&self, i: usize) -> &N
[src]
Gets a reference to i-th element of this point without bound-checking.
fn iter_mut(
&mut self
) -> MatrixIterMut<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>
[src]
&mut self
) -> MatrixIterMut<N, D, U1, <DefaultAllocator as Allocator<N, D>>::Buffer>
Mutably iterates through this point coordinates.
unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut N
[src]
Gets a mutable reference to i-th element of this point without bound-checking.
unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)
[src]
Swaps two entries without bound-checking.
impl<N: Scalar, D: DimName> Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
unsafe fn new_uninitialized() -> Self
[src]
Creates a new point with uninitialized coordinates.
fn origin() -> Self where
N: Zero,
[src]
N: Zero,
Creates a new point with all coordinates equal to zero.
fn from_homogeneous(v: VectorN<N, DimNameSum<D, U1>>) -> Option<Self> where
N: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<N, DimNameSum<D, U1>>,
[src]
N: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
DefaultAllocator: Allocator<N, DimNameSum<D, U1>>,
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]
DefaultAllocator: Allocator<N, U1>,
impl<N: Scalar> Point<N, U2> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
impl<N: Scalar> Point<N, U3> where
DefaultAllocator: Allocator<N, U3>,
[src]
DefaultAllocator: Allocator<N, U3>,
impl<N: Scalar> Point<N, U4> where
DefaultAllocator: Allocator<N, U4>,
[src]
DefaultAllocator: Allocator<N, U4>,
impl<N: Scalar> Point<N, U5> where
DefaultAllocator: Allocator<N, U5>,
[src]
DefaultAllocator: Allocator<N, U5>,
fn new(x: N, y: N, z: N, w: N, a: N) -> Point<N, U5>
[src]
Initializes this matrix from its components.
impl<N: Scalar> Point<N, U6> where
DefaultAllocator: Allocator<N, U6>,
[src]
DefaultAllocator: Allocator<N, U6>,
fn new(x: N, y: N, z: N, w: N, a: N, b: N) -> Point<N, U6>
[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]
DefaultAllocator: Allocator<N, D>,
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]
DefaultAllocator: Allocator<N, D>,
<DefaultAllocator as Allocator<N, D>>::Buffer: Hash,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
DefaultAllocator: Allocator<N, D>,
<DefaultAllocator as Allocator<N, D>>::Buffer: Copy,
impl<N: Scalar, D: DimName> Clone for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
<DefaultAllocator as Allocator<N, D>>::Buffer: Clone,
[src]
DefaultAllocator: Allocator<N, D>,
<DefaultAllocator as Allocator<N, D>>::Buffer: Clone,
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
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]
DefaultAllocator: Allocator<N, D>,
N::Epsilon: Copy,
type Epsilon = N::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
[src]
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
[src]
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
[src]
The default ULPs to tolerate when testing values that are far-apart. Read more
fn relative_eq(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
A test for equality that uses a relative comparison if the values are far apart.
fn ulps_eq(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
A test for equality that uses units in the last place (ULP) if the values are far apart.
fn relative_ne(
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
[src]
&self,
other: &Self,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
The inverse of ApproxEq::relative_eq
.
fn ulps_ne(&self, other: &Self, epsilon: Self::Epsilon, max_ulps: u32) -> bool
[src]
The inverse of ApproxEq::ulps_eq
.
impl<N: Scalar + Eq, D: DimName> Eq for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
impl<N: Scalar, D: DimName> PartialEq for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
fn eq(&self, right: &Self) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
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]
DefaultAllocator: Allocator<N, D>,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, right: &Self) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, right: &Self) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, right: &Self) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, right: &Self) -> bool
[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]
DefaultAllocator: Allocator<N, D>,
fn fmt(&self, f: &mut Formatter) -> Result
[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]
DefaultAllocator: Allocator<N, D>,
fn max_value() -> Self
[src]
returns the largest finite number this type can represent
fn min_value() -> Self
[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]
DefaultAllocator: Allocator<N, D>,
fn rand<G: Rng>(rng: &mut G) -> Self
[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]
DefaultAllocator: Allocator<N, D>,
type Output = N
The returned type after indexing.
fn index(&self, i: usize) -> &Self::Output
[src]
Performs the indexing (container[index]
) operation.
impl<N: Scalar, D: DimName> IndexMut<usize> for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
fn index_mut(&mut self, i: usize) -> &mut Self::Output
[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]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Performs the unary -
operation.
impl<'a, N: Scalar + ClosedNeg, D: DimName> Neg for &'a Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[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]
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>,
type Output = VectorSum<N, D, D>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Point<N, D>) -> Self::Output
[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]
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>,
type Output = VectorSum<N, D, D>
The resulting type after applying the -
operator.
fn sub(self, right: Point<N, D>) -> Self::Output
[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]
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>,
type Output = VectorSum<N, D, D>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Point<N, D>) -> Self::Output
[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]
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>,
type Output = VectorSum<N, D, D>
The resulting type after applying the -
operator.
fn sub(self, right: Point<N, D>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the -
operator.
fn sub(self, right: Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: &'b Vector<N, D2, SB>) -> Self::Output
[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]
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>,
type Output = Point<N, D1>
The resulting type after applying the +
operator.
fn add(self, right: Vector<N, D2, SB>) -> Self::Output
[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]
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: &'b Vector<N, D2, SB>)
[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]
N: Scalar + ClosedAdd,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: Vector<N, D2, SB>)
[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]
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: &'b Vector<N, D2, SB>)
[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]
N: Scalar + ClosedSub,
SB: Storage<N, D2>,
DefaultAllocator: Allocator<N, D1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: Vector<N, D2, SB>)
[src]
Performs the -=
operation.
impl<N: Scalar + ClosedMul, D: DimName> Mul<N> for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the *
operator.
fn mul(self, right: N) -> Self::Output
[src]
Performs the *
operation.
impl<'a, N: Scalar + ClosedMul, D: DimName> Mul<N> for &'a Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the *
operator.
fn mul(self, right: N) -> Self::Output
[src]
Performs the *
operation.
impl<N: Scalar + ClosedMul, D: DimName> MulAssign<N> for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
fn mul_assign(&mut self, right: N)
[src]
Performs the *=
operation.
impl<N: Scalar + ClosedDiv, D: DimName> Div<N> for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the /
operator.
fn div(self, right: N) -> Self::Output
[src]
Performs the /
operation.
impl<'a, N: Scalar + ClosedDiv, D: DimName> Div<N> for &'a Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
type Output = Point<N, D>
The resulting type after applying the /
operator.
fn div(self, right: N) -> Self::Output
[src]
Performs the /
operation.
impl<N: Scalar + ClosedDiv, D: DimName> DivAssign<N> for Point<N, D> where
DefaultAllocator: Allocator<N, D>,
[src]
DefaultAllocator: Allocator<N, D>,
fn div_assign(&mut self, right: N)
[src]
Performs the /=
operation.
impl<N: Scalar + Field, D: DimName> AffineSpace for Point<N, D> where
N: Scalar + Field,
DefaultAllocator: Allocator<N, D>,
[src]
N: Scalar + Field,
DefaultAllocator: Allocator<N, D>,
type Translation = VectorN<N, D>
The associated vector space.
fn translate_by(&self, t: &Self::Translation) -> Self
[src]
Same as *self + *t
. Applies the additive group action of this affine space's associated vector space on self
. Read more
fn subtract(&self, right: &Self) -> Self::Translation
[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]
DefaultAllocator: Allocator<N, D>,
type Coordinates = VectorN<N, D>
The underlying finite vector space.
type Real = N
The underlying reals.
fn origin() -> Self
[src]
The preferred origin of this euclidean space. Read more
fn coordinates(&self) -> Self::Coordinates
[src]
The coordinates of this point, i.e., the translation from the origin.
fn from_coordinates(coords: Self::Coordinates) -> Self
[src]
Builds a point from its coordinates relative to the origin.
fn scale_by(&self, n: N) -> Self
[src]
Multiplies the distance of this point to Self::origin()
by s
. Read more
fn distance_squared(&self, b: &Self) -> Self::Real
[src]
The distance between two points.
fn distance(&self, b: &Self) -> Self::Real
[src]
The distance between two points.
impl<N, D: DimName> MeetSemilattice for Point<N, D> where
N: Scalar + MeetSemilattice,
DefaultAllocator: Allocator<N, D>,
[src]
N: Scalar + MeetSemilattice,
DefaultAllocator: Allocator<N, D>,
impl<N, D: DimName> JoinSemilattice for Point<N, D> where
N: Scalar + JoinSemilattice,
DefaultAllocator: Allocator<N, D>,
[src]
N: Scalar + JoinSemilattice,
DefaultAllocator: Allocator<N, D>,
impl<N, D: DimName> Lattice for Point<N, D> where
N: Scalar + Lattice,
DefaultAllocator: Allocator<N, D>,
[src]
N: Scalar + Lattice,
DefaultAllocator: Allocator<N, D>,
fn meet_join(&self, other: &Self) -> (Self, Self)
[src]
Returns the infimum and the supremum simultaneously.
fn partial_min(&'a self, other: &'a Self) -> Option<&'a Self>
[src]
Return the minimum of self
and other
if they are comparable.
fn partial_max(&'a self, other: &'a Self) -> Option<&'a Self>
[src]
Return the maximum of self
and other
if they are comparable.
fn partial_sort2(&'a self, other: &'a Self) -> Option<(&'a Self, &'a Self)>
[src]
Sorts two values in increasing order using a partial ordering.
fn partial_clamp(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
[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]
D: DimName,
N1: Scalar,
N2: Scalar + SupersetOf<N1>,
DefaultAllocator: Allocator<N2, D> + Allocator<N1, D>,
fn to_superset(&self) -> Point<N2, D>
[src]
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(m: &Point<N2, D>) -> bool
[src]
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(m: &Point<N2, D>) -> Self
[src]
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
[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]
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>,
fn to_superset(&self) -> VectorN<N2, DimNameSum<D, U1>>
[src]
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(v: &VectorN<N2, DimNameSum<D, U1>>) -> bool
[src]
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(v: &VectorN<N2, DimNameSum<D, U1>>) -> Self
[src]
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
[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]
DefaultAllocator: Allocator<N, U1>,
type Target = X<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U1> where
DefaultAllocator: Allocator<N, U1>,
[src]
DefaultAllocator: Allocator<N, U1>,
impl<N: Scalar> Deref for Point<N, U2> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
type Target = XY<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U2> where
DefaultAllocator: Allocator<N, U2>,
[src]
DefaultAllocator: Allocator<N, U2>,
impl<N: Scalar> Deref for Point<N, U3> where
DefaultAllocator: Allocator<N, U3>,
[src]
DefaultAllocator: Allocator<N, U3>,
type Target = XYZ<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U3> where
DefaultAllocator: Allocator<N, U3>,
[src]
DefaultAllocator: Allocator<N, U3>,
impl<N: Scalar> Deref for Point<N, U4> where
DefaultAllocator: Allocator<N, U4>,
[src]
DefaultAllocator: Allocator<N, U4>,
type Target = XYZW<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U4> where
DefaultAllocator: Allocator<N, U4>,
[src]
DefaultAllocator: Allocator<N, U4>,
impl<N: Scalar> Deref for Point<N, U5> where
DefaultAllocator: Allocator<N, U5>,
[src]
DefaultAllocator: Allocator<N, U5>,
type Target = XYZWA<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U5> where
DefaultAllocator: Allocator<N, U5>,
[src]
DefaultAllocator: Allocator<N, U5>,
impl<N: Scalar> Deref for Point<N, U6> where
DefaultAllocator: Allocator<N, U6>,
[src]
DefaultAllocator: Allocator<N, U6>,
type Target = XYZWAB<N>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
Dereferences the value.
impl<N: Scalar> DerefMut for Point<N, U6> where
DefaultAllocator: Allocator<N, U6>,
[src]
DefaultAllocator: Allocator<N, U6>,