#include <CompareState.h>


Public Member Functions | |
| CompareState () | |
| Default constructor. | |
| void | handleEvent (sofa::core::objectmodel::Event *event) |
| Handle an event. | |
| void | processCompareState () |
| Compute the total errors (positions and velocities). | |
| double | getError () |
| Return the total errors (position and velocity). | |
Static Public Member Functions | |
| template<class T > | |
| static bool | canCreate (T *&obj, core::objectmodel::BaseContext *context, core::objectmodel::BaseObjectDescription *arg) |
| Pre-construction check method called by ObjectFactory. | |
Protected Attributes | |
| double | totalError_X |
| total error for positions | |
| double | totalError_V |
| total error for velocities | |
Definition at line 47 of file CompareState.h.
| sofa::component::misc::CompareState::CompareState | ( | ) |
Default constructor.
Definition at line 50 of file CompareState.cpp.
References totalError_V, and totalError_X.
| static bool sofa::component::misc::CompareState::canCreate | ( | T *& | obj, | |
| core::objectmodel::BaseContext * | context, | |||
| core::objectmodel::BaseObjectDescription * | arg | |||
| ) | [inline, static] |
Pre-construction check method called by ObjectFactory.
Check that DataTypes matches the MechanicalState.
Reimplemented from sofa::component::misc::ReadState.
Definition at line 63 of file CompareState.h.
References sofa::core::objectmodel::BaseContext::getMechanicalState().
| double sofa::component::misc::CompareState::getError | ( | ) | [inline] |
Return the total errors (position and velocity).
Definition at line 71 of file CompareState.h.
References totalError_V, and totalError_X.
Referenced by sofa::component::misc::CompareStateResult::processNodeTopDown().
| void sofa::component::misc::CompareState::handleEvent | ( | sofa::core::objectmodel::Event * | e | ) | [virtual] |
Handle an event.
Reimplemented from sofa::component::misc::ReadState.
Definition at line 58 of file CompareState.cpp.
References processCompareState().
| void sofa::component::misc::CompareState::processCompareState | ( | ) |
Compute the total errors (positions and velocities).
Definition at line 70 of file CompareState.cpp.
References sofa::core::componentmodel::behavior::BaseMechanicalState::compareV(), sofa::core::componentmodel::behavior::BaseMechanicalState::compareX(), sofa::component::misc::ReadState::f_shift, sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getTime(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::misc::ReadState::infile, sofa::component::misc::ReadState::lastTime, sofa::component::misc::ReadState::mmodel, sofa::component::misc::ReadState::nextTime, totalError_V, and totalError_X.
Referenced by handleEvent().
double sofa::component::misc::CompareState::totalError_V [protected] |
total error for velocities
Definition at line 78 of file CompareState.h.
Referenced by CompareState(), getError(), and processCompareState().
double sofa::component::misc::CompareState::totalError_X [protected] |
total error for positions
Definition at line 76 of file CompareState.h.
Referenced by CompareState(), getError(), and processCompareState().
1.5.7.1