#include <mbd_force_interface.h>
Public Types | |
typedef mbd_types::body_type | body_type |
typedef mbd_types::math_policy::vector3_type | vector3_type |
Public Member Functions | |
virtual void | compute (body_type const &body, vector3_type &force, vector3_type &torque)=0 |
force_type (callback) Class. force_type types are implemented by inheritence from this adapter, the compute method must be overriden and specified for the wanted force type.
Notice that a force is a type that can be applied to multiple bodies, such as gravity which can be shared by all bodies in a configuration. invocation of the run method evaluates the force types effect on the specified body.
typedef mbd_types::body_type OpenTissue::mbd::ForceInterface< mbd_types >::body_type |
typedef mbd_types::math_policy::vector3_type OpenTissue::mbd::ForceInterface< mbd_types >::vector3_type |
virtual void OpenTissue::mbd::ForceInterface< mbd_types >::compute | ( | body_type const & | body, | |
vector3_type & | force, | |||
vector3_type & | torque | |||
) | [pure virtual] |
Compute External force_type and Torque. Add the effect of a external force type to the force and torque accumulators of the specified rigid body.
body | A pointer to the rigid body where the external force type should be applied. | |
force | Upon return this vector should contain the force on the center of mass. | |
torque | Upon return this vector should contain the torque wrt. the center of mass. |