#include <continuous_default_motion_policy.h>
Static Public Member Functions | |
template<typename transform_type > | |
static void | compute_velocities (transform_type const &T_from, transform_type const &T_to, typename transform_type::value_type const &delta_tau, typename transform_type::vector3_type &v, typename transform_type::vector3_type &omega) |
template<typename transform_type > | |
static transform_type | integrate_motion (transform_type const &X, typename transform_type::value_type const &tau, typename transform_type::vector3_type const &v, typename transform_type::vector3_type const &omega) |
template<typename transform_type , typename object_type1 , typename object_type2 > | |
static void | compute_closest_points (transform_type const &X_a, object_type1 const &A, transform_type const &X_b, object_type2 const &B, typename transform_type::vector3_type &p_a, typename transform_type::vector3_type &p_b) |
Default Motion Policy. Continuous collision detection algorithms often need to interpretate continuous motion from discrete motion. That requires converting discrete poses into velocities or interpolating motion etc.. Or simply to use a discrete collision detection system as a sub-system in the continuous collision detection algorithm.
This policy class contains default behaviour for such tasks.
static void OpenTissue::collision::continuous::DefaultMotionPolicy::compute_closest_points | ( | transform_type const & | X_a, | |
object_type1 const & | A, | |||
transform_type const & | X_b, | |||
object_type2 const & | B, | |||
typename transform_type::vector3_type & | p_a, | |||
typename transform_type::vector3_type & | p_b | |||
) | [inline, static] |
Compute Closest Points.
X_a | The current coordinate transformation of object A. | |
A | A support functor desribing the shape of object A. | |
X_b | The current coordinate transformation of object B. | |
B | A support functor desribing the shape of object B. | |
p_a | Upon return this argument holds the closest point on object A. | |
p_b | Upon return this argument holds the closest point on object B. |
static void OpenTissue::collision::continuous::DefaultMotionPolicy::compute_velocities | ( | transform_type const & | T_from, | |
transform_type const & | T_to, | |||
typename transform_type::value_type const & | delta_tau, | |||
typename transform_type::vector3_type & | v, | |||
typename transform_type::vector3_type & | omega | |||
) | [inline, static] |
Compute Velocities. This function tries to convert two poses from the motion of an object into equivalent velocities.
The function works under the assumption that the object in questions moves at constant linear and angular velocities between the two given poses. The duration of the motion is assumed to be one unit (second).
T_from | A coordinate transformation indicating the starting pose of the motion. | |
T_to | A coordinate transformation indicating the ending pose of the motion. | |
delta_tau | The time between from pose and to pose. | |
v | Upon return this argument holds the value of the constant linear velocity. | |
omega | Upon return this argument holds the value of the constant angular velocity. |
static transform_type OpenTissue::collision::continuous::DefaultMotionPolicy::integrate_motion | ( | transform_type const & | X, | |
typename transform_type::value_type const & | tau, | |||
typename transform_type::vector3_type const & | v, | |||
typename transform_type::vector3_type const & | omega | |||
) | [inline, static] |
Integrate Motion.
X | The current coordinate transformation of the object. | |
tau | The time step into the future where the coordinate transformation of the object should be computed. | |
v | The current linear velocity of the object. | |
omega | The current angular velocity of the object. |