[−][src]Struct oxygengine_physics_2d::prelude::ncollide2d::query::algorithms::CSOPoint
A point of a Configuration-Space Obstacle.
A Configuration-Space Obstacle (CSO) is the result of the Minkowski Difference of two solids. In other words, each of its points correspond to the difference of two point, each belonging to a different solid.
Fields
point: Point<N, U2>
The point on the CSO. This is equal to self.orig1 - self.orig2
, unless this CSOPoint
has been translated with self.translate.
orig1: Point<N, U2>
The original point on the first shape used to compute self.point
.
orig2: Point<N, U2>
The original point on the second shape used to compute self.point
.
Implementations
impl<N> CSOPoint<N> where
N: RealField,
[src]
N: RealField,
pub fn new(orig1: Point<N, U2>, orig2: Point<N, U2>) -> CSOPoint<N>
[src]
Initializes a CSO point with orig1 - orig2
.
pub fn new_with_point(
point: Point<N, U2>,
orig1: Point<N, U2>,
orig2: Point<N, U2>
) -> CSOPoint<N>
[src]
point: Point<N, U2>,
orig1: Point<N, U2>,
orig2: Point<N, U2>
) -> CSOPoint<N>
Initializes a CSO point with all information provided.
It is assumed, but not checked, that point == orig1 - orig2
.
pub fn single_point(point: Point<N, U2>) -> CSOPoint<N>
[src]
Initializes a CSO point where both original points are equal.
pub fn origin() -> CSOPoint<N>
[src]
CSO point where all components are set to zero.
pub fn from_shapes_toward<G1, G2>(
m1: &Isometry<N, U2, Unit<Complex<N>>>,
g1: &G1,
m2: &Isometry<N, U2, Unit<Complex<N>>>,
g2: &G2,
dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
) -> CSOPoint<N> where
G1: SupportMap<N> + ?Sized,
G2: SupportMap<N> + ?Sized,
[src]
m1: &Isometry<N, U2, Unit<Complex<N>>>,
g1: &G1,
m2: &Isometry<N, U2, Unit<Complex<N>>>,
g2: &G2,
dir: &Unit<Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>>
) -> CSOPoint<N> where
G1: SupportMap<N> + ?Sized,
G2: SupportMap<N> + ?Sized,
Computes the support point of the CSO of g1
and g2
toward the unit direction dir
.
pub fn from_shapes<G1, G2>(
m1: &Isometry<N, U2, Unit<Complex<N>>>,
g1: &G1,
m2: &Isometry<N, U2, Unit<Complex<N>>>,
g2: &G2,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> CSOPoint<N> where
G1: SupportMap<N> + ?Sized,
G2: SupportMap<N> + ?Sized,
[src]
m1: &Isometry<N, U2, Unit<Complex<N>>>,
g1: &G1,
m2: &Isometry<N, U2, Unit<Complex<N>>>,
g2: &G2,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> CSOPoint<N> where
G1: SupportMap<N> + ?Sized,
G2: SupportMap<N> + ?Sized,
Computes the support point of the CSO of g1
and g2
toward the direction dir
.
pub fn translate(
&self,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> CSOPoint<N>
[src]
&self,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
) -> CSOPoint<N>
Translate the CSO point.
pub fn translate_mut(
&mut self,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
)
[src]
&mut self,
dir: &Matrix<N, U2, U1, <DefaultAllocator as Allocator<N, U2, U1>>::Buffer>
)
Translate in-place the CSO point.
Trait Implementations
impl<N> Clone for CSOPoint<N> where
N: Clone + RealField,
[src]
N: Clone + RealField,
impl<N> Copy for CSOPoint<N> where
N: Copy + RealField,
[src]
N: Copy + RealField,
impl<N> Debug for CSOPoint<N> where
N: Debug + RealField,
[src]
N: Debug + RealField,
impl<N> PartialEq<CSOPoint<N>> for CSOPoint<N> where
N: PartialEq<N> + RealField,
[src]
N: PartialEq<N> + RealField,
impl<N> Sub<CSOPoint<N>> for CSOPoint<N> where
N: RealField,
[src]
N: RealField,
Auto Trait Implementations
impl<N> RefUnwindSafe for CSOPoint<N> where
N: RefUnwindSafe + Scalar,
N: RefUnwindSafe + Scalar,
impl<N> Send for CSOPoint<N> where
N: Scalar,
N: Scalar,
impl<N> Sync for CSOPoint<N> where
N: Scalar,
N: Scalar,
impl<N> Unpin for CSOPoint<N> where
N: Scalar + Unpin,
N: Scalar + Unpin,
impl<N> UnwindSafe for CSOPoint<N> where
N: Scalar + UnwindSafe,
N: Scalar + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
fn get_type_id(&self) -> TypeId
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> Event for T where
T: Send + Sync + 'static,
T: Send + Sync + 'static,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: Any,
T: Any,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<T> Slottable for T where
T: Copy,
[src]
T: Copy,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UserData for T where
T: Clone + Send + Sync + Any,
[src]
T: Clone + Send + Sync + Any,
fn clone_boxed(&self) -> Box<dyn UserData + 'static>
[src]
fn to_any(&self) -> Box<dyn Any + 'static + Sync + Send>
[src]
fn as_any(&self) -> &(dyn Any + 'static + Sync + Send)
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,