The function returns a relative transformation between the two "closest" convex shapes it contains.
Two sets of convex shapes can be given to this class:
a set of object contact surfaces, , which can be in contact with the environment,
a set of floor contact surfaces, , which can support objects.
The distance \f$ d (f_j, o_i) \f$ between object surface
\f$o_i\f$ and environment surface \f$ f_j \f$ is defined by:
\f{equation*}
d (f_j, o_i)^2 =
\left\lbrace \begin{array}{cl}
d_{\parallel}^2 + d_{\perp}^2 &, \text{ if } d_{\parallel} > 0 \\
d_{\perp}^2 &, \text{ otherwise}
\end{array} \right.
\f}
where
\li \f$P (C_{o_i}, f_j)\f$ is the projection of the center \f$C_{o_i}\f$ of
\image html convex-shape-contact.svg
The function first selects the pair \f$(o_i,f_j)\f$ with shortest distance.
\f$o_i\f$ is \em inside \f$f_j\f$ if \f$d(i,j) < 0\f$.
It returns a value that depends on the contact types:
| Contact type | Inside | Outside |
| -------------- | -------- | ------- |
| ConvexShapeContact::POINT_ON_PLANE | \f$(x+m,0,0,0,0)\f$ |
where
\li \f$m\f$ is the normal margin (used to avoid collisions),
\li \f$x,y,z,rx,ry,rz\f$ represents the output of the RelativeTransformation
between the element of the pair.
\sa ConvexShapeContactComplement
Return pair of joints the relative pose between which modifies the function value if any
Currently only supports the case when all the joints for floors are the same and all the joints for objects involved are the same
Returns
pair of joints whose relative pose determines the value of the contact function, arranged in order of increasing joint index, or a pair of empty shared pointers.