Public Types | Public Member Functions | Protected Attributes

OpenTissue::mbd::CoreConstraintInterface< mbd_types > Class Template Reference

#include <mbd_core_constraint_interface.h>

Inheritance diagram for OpenTissue::mbd::CoreConstraintInterface< mbd_types >:
OpenTissue::mbd::ConstraintInterface< mbd_types > OpenTissue::mbd::SubConstraintInterface< mbd_types > OpenTissue::mbd::AngularJointLimit< mbd_types > OpenTissue::mbd::AngularJointMotor< mbd_types > OpenTissue::mbd::LinearJointLimit< mbd_types > OpenTissue::mbd::LinearJointMotor< mbd_types > OpenTissue::mbd::ReachCone< mbd_types >

List of all members.

Public Types

typedef
mbd_types::math_policy::index_type 
size_type
typedef
mbd_types::math_policy::real_type 
real_type
typedef
mbd_types::math_policy::value_traits 
value_traits

Public Member Functions

 CoreConstraintInterface ()
virtual ~CoreConstraintInterface ()
void set_frames_per_second (real_type const &fps)
real_type const & get_frames_per_second () const
void set_error_reduction_parameter (real_type const &erp)
virtual real_type get_error_reduction_parameter () const
bool & use_erp ()
bool const & use_erp () const
bool is_active () const
void set_active (bool active)
virtual size_type get_number_of_jacobian_rows () const =0

Protected Attributes

real_type m_erp
 Error reduction parameter (must be in the range 0..1).
real_type m_fps
 Frames per second (used to compute the amount of error correction that should be done within the next timestep).
bool m_active
 Boolean flag indicating if constraint is set to active or not (this has nothing to to do with the evalute method).
bool m_use_erp

template<typename mbd_types>
class OpenTissue::mbd::CoreConstraintInterface< mbd_types >


Member Typedef Documentation


Constructor & Destructor Documentation

template<typename mbd_types >
OpenTissue::mbd::CoreConstraintInterface< mbd_types >::CoreConstraintInterface (  )  [inline]
template<typename mbd_types >
virtual OpenTissue::mbd::CoreConstraintInterface< mbd_types >::~CoreConstraintInterface (  )  [inline, virtual]

Member Function Documentation

template<typename mbd_types >
virtual real_type OpenTissue::mbd::CoreConstraintInterface< mbd_types >::get_error_reduction_parameter (  )  const [inline, virtual]

Get Error Reduction Parameter.

Returns:
The value of the error reduction parameter.
template<typename mbd_types >
real_type const& OpenTissue::mbd::CoreConstraintInterface< mbd_types >::get_frames_per_second (  )  const [inline]

Get Frames Per Second.

Returns:
The value of frames per second parameter.
template<typename mbd_types >
virtual size_type OpenTissue::mbd::CoreConstraintInterface< mbd_types >::get_number_of_jacobian_rows (  )  const [pure virtual]

Return Number of Jacobian Rows. The number of jacobian rows corresponds to the number of jacobian variables.

Returns:
Jacobian rows.

Implemented in OpenTissue::mbd::AngularJointLimit< mbd_types >, OpenTissue::mbd::LinearJointLimit< mbd_types >, OpenTissue::mbd::ReachCone< mbd_types >, OpenTissue::mbd::AngularJointMotor< mbd_types >, and OpenTissue::mbd::LinearJointMotor< mbd_types >.

template<typename mbd_types >
bool OpenTissue::mbd::CoreConstraintInterface< mbd_types >::is_active (  )  const [inline]

Get Active State. This method depends on the isEvaluatedActive() method and get_number_of_jacobian_rows(). If during evaluation the constraint is evaluated to be non-active then this takes precedence over the user setting.

Returns:
The current active state.
template<typename mbd_types >
void OpenTissue::mbd::CoreConstraintInterface< mbd_types >::set_active ( bool  active  )  [inline]

Set Active. This method can be used by an end user to force a constraint to be inactive without having to remove the constraint from the configuration.

This could for instance be useful to model a joint breaking.

Parameters:
active The new active state.
template<typename mbd_types >
void OpenTissue::mbd::CoreConstraintInterface< mbd_types >::set_error_reduction_parameter ( real_type const &  erp  )  [inline]

Set Error Reduction Parameter.

Parameters:
erp The new value of the error reduction parameter must be in the interval 0..1
template<typename mbd_types >
void OpenTissue::mbd::CoreConstraintInterface< mbd_types >::set_frames_per_second ( real_type const &  fps  )  [inline]

Set Frames per Second Parameter.

Parameters:
fps The new value of the frames per second parameter.
template<typename mbd_types >
bool& OpenTissue::mbd::CoreConstraintInterface< mbd_types >::use_erp (  )  [inline]
template<typename mbd_types >
bool const& OpenTissue::mbd::CoreConstraintInterface< mbd_types >::use_erp (  )  const [inline]

Member Data Documentation

template<typename mbd_types >
bool OpenTissue::mbd::CoreConstraintInterface< mbd_types >::m_active [protected]

Boolean flag indicating if constraint is set to active or not (this has nothing to to do with the evalute method).

template<typename mbd_types >
real_type OpenTissue::mbd::CoreConstraintInterface< mbd_types >::m_erp [protected]

Error reduction parameter (must be in the range 0..1).

template<typename mbd_types >
real_type OpenTissue::mbd::CoreConstraintInterface< mbd_types >::m_fps [protected]

Frames per second (used to compute the amount of error correction that should be done within the next timestep).

template<typename mbd_types >
bool OpenTissue::mbd::CoreConstraintInterface< mbd_types >::m_use_erp [protected]

The documentation for this class was generated from the following file: