pub struct CSOPoint {
pub point: Point<Real>,
pub orig1: Point<Real>,
pub orig2: Point<Real>,
}
Expand description
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<Real>
The point on the CSO. This is equal to self.orig1 - self.orig2
, unless this CSOPoint
has been translated with self.translate.
orig1: Point<Real>
The original point on the first shape used to compute self.point
.
orig2: Point<Real>
The original point on the second shape used to compute self.point
.
Implementations§
source§impl CSOPoint
impl CSOPoint
sourcepub fn new(orig1: Point<Real>, orig2: Point<Real>) -> Self
pub fn new(orig1: Point<Real>, orig2: Point<Real>) -> Self
Initializes a CSO point with orig1 - orig2
.
sourcepub fn new_with_point(
point: Point<Real>,
orig1: Point<Real>,
orig2: Point<Real>
) -> Self
pub fn new_with_point( point: Point<Real>, orig1: Point<Real>, orig2: Point<Real> ) -> Self
Initializes a CSO point with all information provided.
It is assumed, but not checked, that point == orig1 - orig2
.
sourcepub fn single_point(point: Point<Real>) -> Self
pub fn single_point(point: Point<Real>) -> Self
Initializes a CSO point where both original points are equal.
sourcepub fn from_shapes_toward<G1, G2>(
pos12: &Isometry<Real>,
g1: &G1,
g2: &G2,
dir: &Unit<Vector<Real>>
) -> Self
pub fn from_shapes_toward<G1, G2>( pos12: &Isometry<Real>, g1: &G1, g2: &G2, dir: &Unit<Vector<Real>> ) -> Self
Computes the support point of the CSO of g1
and g2
toward the unit direction dir
.
sourcepub fn from_shapes<G1, G2>(
pos12: &Isometry<Real>,
g1: &G1,
g2: &G2,
dir: &Vector<Real>
) -> Self
pub fn from_shapes<G1, G2>( pos12: &Isometry<Real>, g1: &G1, g2: &G2, dir: &Vector<Real> ) -> Self
Computes the support point of the CSO of g1
and g2
toward the direction dir
.
sourcepub fn translate_mut(&mut self, dir: &Vector<Real>)
pub fn translate_mut(&mut self, dir: &Vector<Real>)
Translate in-place the CSO point.
Trait Implementations§
source§impl PartialEq for CSOPoint
impl PartialEq for CSOPoint
impl Copy for CSOPoint
impl StructuralPartialEq for CSOPoint
Auto Trait Implementations§
impl Freeze for CSOPoint
impl RefUnwindSafe for CSOPoint
impl Send for CSOPoint
impl Sync for CSOPoint
impl Unpin for CSOPoint
impl UnwindSafe for CSOPoint
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.