Trait ncollide::math::Point
[−]
[src]
pub trait Point: 'static + Send + Copy + Sync + Index<usize, Output = Self::Real, Output = Self::Real> + IndexMut<usize> + Display + Lattice + EuclideanSpace<Coordinates = Self::Vector> + Bounded + ApproxEq<Epsilon = Self::Real> where
<Self::Vector as InnerSpace>::Real == Self::Real,
<Self::Vector as Add<Self::Vector>>::Output == Self::Vector,
<Self::Vector as Sub<Self::Vector>>::Output == Self::Vector,
<Self::Vector as Mul<Self::Real>>::Output == Self::Vector,
<Self::Vector as Div<Self::Real>>::Output == Self::Vector,
<Self::Vector as Neg>::Output == Self::Vector, { type Vector: Vector + Add<Self::Vector> + Sub<Self::Vector> + Mul<Self::Real> + Div<Self::Real> + Neg + AddAssign<Self::Vector> + SubAssign<Self::Vector> + MulAssign<Self::Real> + DivAssign<Self::Real>; fn axpy(&mut self, a: Self::Real, rhs: &Self, b: Self::Real); fn ccw_face_normal(pts: &[&Self]) -> Option<Unit<Self::Vector>>; }
Trait implemented by point types usable by ncollide.
Associated Types
type Vector: Vector + Add<Self::Vector> + Sub<Self::Vector> + Mul<Self::Real> + Div<Self::Real> + Neg + AddAssign<Self::Vector> + SubAssign<Self::Vector> + MulAssign<Self::Real> + DivAssign<Self::Real>
The underlying vector type used to express points coordinates.
Required Methods
fn axpy(&mut self, a: Self::Real, rhs: &Self, b: Self::Real)
Computes self = a * rhs + b * self
.
fn ccw_face_normal(pts: &[&Self]) -> Option<Unit<Self::Vector>>
Computes the outward normal of a 2D or 3D face.
In 2D, returns a unit vector orthogonal to the oriented segment formed by { pts[0], pts[1] }
. This vector points toward the half-space "on the right" of this segment.
In 3D, returns the unit normal of the triangle formed by { pts[0], pts[1], pts[2] }
and oriented counter-clock-wise.
Implementations on Foreign Types
impl<N, D> Point for Point<N, D> where
D: DimName,
N: Real,
DefaultAllocator: Allocator<N, D, U1>,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Copy,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Sync,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Send,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: 'static,
Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>: Vector,
<Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer> as InnerSpace>::Real == N,
[src]
D: DimName,
N: Real,
DefaultAllocator: Allocator<N, D, U1>,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Copy,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Sync,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: Send,
<DefaultAllocator as Allocator<N, D, U1>>::Buffer: 'static,
Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer>: Vector,
<Matrix<N, D, U1, <DefaultAllocator as Allocator<N, D, U1>>::Buffer> as InnerSpace>::Real == N,