Struct ncollide2df64::geom::GeomWithMargin
pub struct GeomWithMargin<'a, G> { // some fields omitted }
Extends the wrapped geometry with its margin.
The purpose of this structure as to make the support_point_without_margin
method return
result of the wrapped geometry support_point
method instead.
Methods
impl<'a, G> GeomWithMargin<'a, G>
fn new(geom: &'a G) -> GeomWithMargin<'a, G>
Creates a new GeomWithMargin
.
Trait Implementations
impl<'a, G> HasMargin for GeomWithMargin<'a, G>
fn margin(&self) -> N
The geometry margin.
impl<'a, _M, G: Implicit<V, _M>> Implicit<V, _M> for GeomWithMargin<'a, G>
fn support_point(&self, m: &_M, 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, m: &_M, 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.