Struct ncollide2df64::geom::MinkowskiSum
pub struct MinkowskiSum<'a, G1, G2> { // some fields omitted }
Implicit representation of the Minkowski sum of two geometries.
The only way to obtain the sum points is to use its support mapping function.
G1
: type of the first object involved on the sum.G2
: type of the second object involved on the sum.
Methods
impl<'a, G1, G2> MinkowskiSum<'a, G1, G2>
fn new(m1: &'a M, g1: &'a G1, m2: &'a M, g2: &'a G2) -> MinkowskiSum<'a, G1, G2>
Builds the Minkowski sum of two geometries. Since the representation is implicit, this is done in constant time.
fn m1(&self) -> &'a M
The transformation matrix of the first geometry of this Minkowski Sum.
fn m2(&self) -> &'a M
The transformation matrix of the second geometry of this Minkowski Sum.
fn g1(&self) -> &'a G1
The first geometry of this Minkowski Sum.
fn g2(&self) -> &'a G2
The second geometry of this Minkowski Sum.
Trait Implementations
impl<'a, G1: Eq, G2: Eq> Eq for MinkowskiSum<'a, G1, G2>
Automatically derived.
fn eq(&self, __arg_0: &MinkowskiSum<'a, G1, G2>) -> bool
fn ne(&self, __arg_0: &MinkowskiSum<'a, G1, G2>) -> bool
impl<'a, G1: ToStr, G2: ToStr> ToStr for MinkowskiSum<'a, G1, G2>
Automatically derived.
fn to_str(&self) -> ~str
impl<'a, G1: Clone, G2: Clone> Clone for MinkowskiSum<'a, G1, G2>
Automatically derived.
fn clone(&self) -> MinkowskiSum<'a, G1, G2>
impl<'a, G1: Implicit<V, M>, G2: Implicit<V, M>> RayCast for MinkowskiSum<'a, G1, G2>
fn toi_and_normal_with_ray(&self, ray: &Ray) -> Option<(N, V)>
Computes the intersection point between this geometry and a ray.
fn toi_with_ray(&self, ray: &Ray) -> Option<N>
Computes the time of impact between this geometry and a ray
fn intersects_ray(&self, ray: &Ray) -> bool
Tests whether a ray intersects this geometry.
fn toi_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<N>
Computes the time of impact between this transform geometry and a ray.
fn toi_and_normal_with_transform_and_ray(&self, m: &M, ray: &Ray) -> Option<(N, V)>
Computes the time of impact, and normal between this transformed geometry and a ray.
fn intersects_with_transform_and_ray(&self, m: &M, ray: &Ray) -> bool
Tests whether a ray intersects this transformed geometry.
impl<'a, G1: HasMargin, G2: HasMargin> HasMargin for MinkowskiSum<'a, G1, G2>
fn margin(&self) -> N
The geometry margin.
impl<'a, G1: Implicit<V, M>, G2: Implicit<V, M>> Implicit<V, Identity> for MinkowskiSum<'a, G1, G2>
fn support_point(&self, _: &Identity, dir: &V) -> V
Evaluates the support function of the object. A support function is a function associating a vector to the geometry point which maximizes their dot product.
Arguments:
dir
- the input of the support function. It is not required for it to be normalized.
fn support_point_without_margin(&self, _: &Identity, dir: &V) -> V
Evaluates the support function of the object. A support function is a
function associating a vector to the geometry point which maximizes their
dot product. This does not include the margin
of the object. Margins are
geometry-dependent. Use support_point
to sample the complete geometry.
Arguments:
dir
- the input of the support function. It is not required for it to be normalized.