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
coords: ColumnVector<N, D, S>
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]
fn from_coordinates(coords: ColumnVector<N, D, S>) -> PointBase<N, D, S>
Creates a new point with the given coordinates.
impl<N: Scalar, D: DimName, S: Storage<N, D, U1>> PointBase<N, D, S>
[src]
fn into_owned(self) -> OwnedPoint<N, D, S::Alloc>
Moves this point into one that owns its data.
fn clone_owned(&self) -> OwnedPoint<N, D, S::Alloc>
Clones this point into one that owns its data.
fn len(&self) -> usize
The dimension of this point.
fn stride(&self) -> usize
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, S>
Iterates through this point coordinates.
unsafe fn get_unchecked(&self, i: usize) -> &N
Gets a reference to i-th element of this point without bound-checking.
fn to_homogeneous(&self) -> OwnedColumnVector<N, DimNameSum<D, U1>, S::Alloc> where
N: One,
D: DimNameAdd<U1>,
S::Alloc: Allocator<N, DimNameSum<D, U1>, U1>,
N: One,
D: DimNameAdd<U1>,
S::Alloc: Allocator<N, DimNameSum<D, U1>, U1>,
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]
fn iter_mut(&mut self) -> MatrixIterMut<N, D, U1, S>
Mutably iterates through this point coordinates.
unsafe fn get_unchecked_mut(&mut self, i: usize) -> &mut N
Gets a mutable reference to i-th element of this point without bound-checking.
unsafe fn swap_unchecked(&mut self, i1: usize, i2: usize)
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]
N: Scalar,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
unsafe fn new_uninitialized() -> Self
Creates a new point with uninitialized coordinates.
fn origin() -> Self where
N: Zero,
N: Zero,
Creates a new point with all coordinates equal to zero.
fn from_homogeneous<SB>(
v: ColumnVector<N, DimNameSum<D, U1>, SB>
) -> Option<Self> where
N: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
SB: Storage<N, DimNameSum<D, U1>, U1, Alloc = S::Alloc>,
S::Alloc: Allocator<N, DimNameSum<D, U1>, U1>,
v: ColumnVector<N, DimNameSum<D, U1>, SB>
) -> Option<Self> where
N: Scalar + Zero + One + ClosedDiv,
D: DimNameAdd<U1>,
SB: Storage<N, DimNameSum<D, U1>, U1, Alloc = S::Alloc>,
S::Alloc: Allocator<N, DimNameSum<D, U1>, 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, S> PointBase<N, U1, S> where
N: Scalar,
S: OwnedStorage<N, U1, U1>,
S::Alloc: OwnedAllocator<N, U1, U1, S>,
[src]
N: Scalar,
S: OwnedStorage<N, U1, U1>,
S::Alloc: OwnedAllocator<N, U1, U1, S>,
impl<N, S> PointBase<N, U2, S> where
N: Scalar,
S: OwnedStorage<N, U2, U1>,
S::Alloc: OwnedAllocator<N, U2, U1, S>,
[src]
N: Scalar,
S: OwnedStorage<N, U2, U1>,
S::Alloc: OwnedAllocator<N, U2, U1, S>,
impl<N, S> PointBase<N, U3, S> where
N: Scalar,
S: OwnedStorage<N, U3, U1>,
S::Alloc: OwnedAllocator<N, U3, U1, S>,
[src]
N: Scalar,
S: OwnedStorage<N, U3, U1>,
S::Alloc: OwnedAllocator<N, U3, U1, S>,
impl<N, S> PointBase<N, U4, S> where
N: Scalar,
S: OwnedStorage<N, U4, U1>,
S::Alloc: OwnedAllocator<N, U4, U1, S>,
[src]
N: Scalar,
S: OwnedStorage<N, U4, U1>,
S::Alloc: OwnedAllocator<N, U4, U1, S>,
impl<N, S> PointBase<N, U5, S> where
N: Scalar,
S: OwnedStorage<N, U5, U1>,
S::Alloc: OwnedAllocator<N, U5, U1, S>,
[src]
N: Scalar,
S: OwnedStorage<N, U5, U1>,
S::Alloc: OwnedAllocator<N, U5, U1, S>,
fn new(x: N, y: N, z: N, w: N, a: N) -> PointBase<N, U5, S>
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]
N: Scalar,
S: OwnedStorage<N, U6, U1>,
S::Alloc: OwnedAllocator<N, U6, U1, S>,
fn new(x: N, y: N, z: N, w: N, a: N, b: N) -> PointBase<N, U6, S>
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]
fn hash<__HNDS: Hasher>(&self, __arg_0: &mut __HNDS)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the state provided.
impl<N: Debug + Scalar, D: Debug + DimName, S: Debug + Storage<N, D, U1>> Debug for PointBase<N, D, S>
[src]
impl<N, D, S> Copy for PointBase<N, D, S> where
N: Scalar,
D: DimName,
S: Storage<N, D, U1> + Copy,
[src]
N: Scalar,
D: DimName,
S: Storage<N, D, U1> + Copy,
impl<N, D, S> Clone for PointBase<N, D, S> where
N: Scalar,
D: DimName,
S: Storage<N, D, U1> + Clone,
[src]
N: Scalar,
D: DimName,
S: Storage<N, D, U1> + Clone,
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
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]
N: Scalar + ApproxEq,
S: Storage<N, D, U1>,
N::Epsilon: Copy,
type Epsilon = N::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> Self::Epsilon
The default tolerance to use when testing values that are close together. Read more
fn default_max_relative() -> Self::Epsilon
The default relative tolerance for testing values that are far-apart. Read more
fn default_max_ulps() -> u32
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
&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
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
&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
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]
N: Scalar + Eq,
S: Storage<N, D, U1>,
impl<N, D: DimName, S> PartialEq for PointBase<N, D, S> where
N: Scalar,
S: Storage<N, D, U1>,
[src]
N: Scalar,
S: Storage<N, D, U1>,
fn eq(&self, right: &Self) -> bool
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
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]
N: Scalar + PartialOrd,
S: Storage<N, D, U1>,
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, right: &Self) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, right: &Self) -> bool
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
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, right: &Self) -> bool
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]
N: Scalar + Display,
S: Storage<N, D, U1>,
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]
N: Scalar + Bounded,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
fn max_value() -> Self
returns the largest finite number this type can represent
fn min_value() -> Self
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]
N: Scalar + Rand,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
fn rand<G: Rng>(rng: &mut G) -> Self
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]
N: Scalar,
S: Storage<N, D, U1>,
type Output = N
The returned type after indexing
fn index(&self, i: usize) -> &Self::Output
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]
N: Scalar,
S: StorageMut<N, D, U1>,
fn index_mut(&mut self, i: usize) -> &mut Self::Output
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]
N: Scalar + ClosedNeg,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the -
operator
fn neg(self) -> Self::Output
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]
N: Scalar + ClosedNeg,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the -
operator
fn neg(self) -> Self::Output
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]
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>,
type Output = ColumnVectorSum<N, D, D, SA>
The resulting type after applying the -
operator
fn sub(self, right: &'b PointBase<N, D, SB>) -> Self::Output
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]
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>,
type Output = ColumnVectorSum<N, D, D, SA>
The resulting type after applying the -
operator
fn sub(self, right: PointBase<N, D, SA>) -> Self::Output
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]
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>,
type Output = ColumnVectorSum<N, D, D, SA>
The resulting type after applying the -
operator
fn sub(self, right: &'b PointBase<N, D, SB>) -> Self::Output
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]
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>,
type Output = ColumnVectorSum<N, D, D, SA>
The resulting type after applying the -
operator
fn sub(self, right: PointBase<N, D, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the -
operator
fn sub(self, right: &'b ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the -
operator
fn sub(self, right: ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the -
operator
fn sub(self, right: &'b ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the -
operator
fn sub(self, right: ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the +
operator
fn add(self, right: &'b ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the +
operator
fn add(self, right: ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the +
operator
fn add(self, right: &'b ColumnVector<N, D2, SB>) -> Self::Output
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]
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>,
type Output = OwnedPoint<N, D1, SA::Alloc>
The resulting type after applying the +
operator
fn add(self, right: ColumnVector<N, D2, SB>) -> Self::Output
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]
N: Scalar + ClosedAdd,
SA: StorageMut<N, D1, U1>,
SB: Storage<N, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: &'b ColumnVector<N, D2, SB>)
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]
N: Scalar + ClosedAdd,
SA: StorageMut<N, D1, U1>,
SB: Storage<N, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn add_assign(&mut self, right: ColumnVector<N, D2, SB>)
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]
N: Scalar + ClosedSub,
SA: StorageMut<N, D1, U1>,
SB: Storage<N, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: &'b ColumnVector<N, D2, SB>)
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]
N: Scalar + ClosedSub,
SA: StorageMut<N, D1, U1>,
SB: Storage<N, D2, U1>,
ShapeConstraint: SameNumberOfRows<D1, D2>,
fn sub_assign(&mut self, right: ColumnVector<N, D2, SB>)
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]
N: Scalar + ClosedMul,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the *
operator
fn mul(self, right: N) -> Self::Output
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]
N: Scalar + ClosedMul,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the *
operator
fn mul(self, right: N) -> Self::Output
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]
N: Scalar + ClosedMul,
S: StorageMut<N, D, U1>,
fn mul_assign(&mut self, right: N)
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]
N: Scalar + ClosedDiv,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the /
operator
fn div(self, right: N) -> Self::Output
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]
N: Scalar + ClosedDiv,
S: Storage<N, D, U1>,
type Output = OwnedPoint<N, D, S::Alloc>
The resulting type after applying the /
operator
fn div(self, right: N) -> Self::Output
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]
N: Scalar + ClosedDiv,
S: StorageMut<N, D, U1>,
fn div_assign(&mut self, right: N)
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]
N: Scalar + Field,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
type Translation = ColumnVector<N, D, S>
The associated vector space.
fn translate_by(&self, t: &Self::Translation) -> Self
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
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]
N: Real,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
type Coordinates = ColumnVector<N, D, S>
The underlying finite vector space.
type Real = N
The underlying reals.
fn origin() -> Self
The preferred origin of this euclidean space. Read more
fn coordinates(&self) -> Self::Coordinates
The coordinates of this point, i.e., the translation from the origin.
fn from_coordinates(coords: Self::Coordinates) -> Self
Builds a point from its coordinates relative to the origin.
fn scale_by(&self, n: N) -> Self
Multiplies the distance of this point to Self::origin()
by s
. Read more
fn distance_squared(&self, b: &Self) -> Self::Real
The distance between two points.
fn distance(&self, b: &Self) -> Self::Real
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]
N: Scalar + MeetSemilattice,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
fn meet(&self, other: &Self) -> Self
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]
N: Scalar + JoinSemilattice,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
fn join(&self, other: &Self) -> Self
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]
N: Scalar + Lattice,
S: OwnedStorage<N, D, U1>,
S::Alloc: OwnedAllocator<N, D, U1, S>,
fn meet_join(&self, other: &Self) -> (Self, Self)
Returns the infimum and the supremum simultaneously.
fn partial_min(&'a self, other: &'a Self) -> Option<&'a Self>
Return the minimum of self
and other
if they are comparable.
fn partial_max(&'a self, other: &'a Self) -> Option<&'a Self>
Return the maximum of self
and other
if they are comparable.
fn partial_sort2(&'a self, other: &'a Self) -> Option<(&'a Self, &'a Self)>
Sorts two values in increasing order using a partial ordering.
fn partial_clamp(&'a self, min: &'a Self, max: &'a Self) -> Option<&'a Self>
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]
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>,
fn to_superset(&self) -> PointBase<N2, D, SB>
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(m: &PointBase<N2, D, SB>) -> bool
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(m: &PointBase<N2, D, SB>) -> Self
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
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]
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>,
fn to_superset(&self) -> ColumnVector<N2, DimNameSum<D, U1>, SB>
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(v: &ColumnVector<N2, DimNameSum<D, U1>, SB>) -> bool
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(
v: &ColumnVector<N2, DimNameSum<D, U1>, SB>
) -> Self
v: &ColumnVector<N2, DimNameSum<D, U1>, SB>
) -> Self
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
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]
S: OwnedStorage<N, U1, U1>,
S::Alloc: OwnedAllocator<N, U1, U1, S>,
type Target = X<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U1, U1>,
S::Alloc: OwnedAllocator<N, U1, U1, S>,
impl<N: Scalar, S> Deref for PointBase<N, U2, S> where
S: OwnedStorage<N, U2, U1>,
S::Alloc: OwnedAllocator<N, U2, U1, S>,
[src]
S: OwnedStorage<N, U2, U1>,
S::Alloc: OwnedAllocator<N, U2, U1, S>,
type Target = XY<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U2, U1>,
S::Alloc: OwnedAllocator<N, U2, U1, S>,
impl<N: Scalar, S> Deref for PointBase<N, U3, S> where
S: OwnedStorage<N, U3, U1>,
S::Alloc: OwnedAllocator<N, U3, U1, S>,
[src]
S: OwnedStorage<N, U3, U1>,
S::Alloc: OwnedAllocator<N, U3, U1, S>,
type Target = XYZ<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U3, U1>,
S::Alloc: OwnedAllocator<N, U3, U1, S>,
impl<N: Scalar, S> Deref for PointBase<N, U4, S> where
S: OwnedStorage<N, U4, U1>,
S::Alloc: OwnedAllocator<N, U4, U1, S>,
[src]
S: OwnedStorage<N, U4, U1>,
S::Alloc: OwnedAllocator<N, U4, U1, S>,
type Target = XYZW<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U4, U1>,
S::Alloc: OwnedAllocator<N, U4, U1, S>,
impl<N: Scalar, S> Deref for PointBase<N, U5, S> where
S: OwnedStorage<N, U5, U1>,
S::Alloc: OwnedAllocator<N, U5, U1, S>,
[src]
S: OwnedStorage<N, U5, U1>,
S::Alloc: OwnedAllocator<N, U5, U1, S>,
type Target = XYZWA<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U5, U1>,
S::Alloc: OwnedAllocator<N, U5, U1, S>,
impl<N: Scalar, S> Deref for PointBase<N, U6, S> where
S: OwnedStorage<N, U6, U1>,
S::Alloc: OwnedAllocator<N, U6, U1, S>,
[src]
S: OwnedStorage<N, U6, U1>,
S::Alloc: OwnedAllocator<N, U6, U1, S>,
type Target = XYZWAB<N>
The resulting type after dereferencing
fn deref(&self) -> &Self::Target
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]
S: OwnedStorage<N, U6, U1>,
S::Alloc: OwnedAllocator<N, U6, U1, S>,
impl<N, D: DimName, S> Axpy<N> for PointBase<N, D, S> where
N: Scalar + Field,
S: StorageMut<N, D, U1>,
[src]
N: Scalar + Field,
S: StorageMut<N, D, U1>,
fn axpy(&mut self, a: N, x: &Self)
Computes self = a * x + self
.