#include <SensAble.h>


Public Member Functions | |
| SensAble () | |
| ~SensAble () | |
| void | draw () |
| Render internal data of this object, for debugging purposes. | |
| void | initTextures () |
| Initialize the textures, or other graphical resources. | |
| void | update () |
| used to update the model if necessary. | |
| virtual void | init () |
| Initialization method called at graph modification, during bottom-up traversal. | |
| virtual void | reinit () |
| Update method called when variables used in precomputation are modified. | |
| virtual void | handleEvent (sofa::core::objectmodel::Event *event) |
| Handle an event. | |
| virtual void | updatePosition (double dt) |
| Computation of a new simulation step. | |
Data Fields | |
| Data< sofa::defaulttype::Vec3d > | translation |
| Data< sofa::defaulttype::Quat > | rotation |
| Data< double > | scale |
| Data< double > | tipOffset |
| Data < sofa::defaulttype::RigidTypes::Coord > | xform |
| Data < sofa::defaulttype::RigidTypes::Coord > | xform2 |
| Data< sofa::defaulttype::Vec3d > | pivot |
| Data< bool > | flip |
| Data< bool > | bDraw |
| Data< char > | key1 |
| bool | button1State |
| Data< char > | key2 |
| bool | button2State |
| sofa::defaulttype::Mat3x3d | mrotation |
| sofa::component::collision::SphereModel * | sphereModel |
| sofa::component::MechanicalObject < sofa::defaulttype::RigidTypes > * | rigidModel |
| sofa::defaulttype::Vector3 | currentForce |
Definition at line 47 of file SensAble.h.
| SensAble::SensAble | ( | ) |
Definition at line 184 of file SensAble.cpp.
References sofa::component::collision::TSphereModel< TDataTypes >::addSphere(), sofa::core::objectmodel::BaseObject::f_listening, sofa::core::objectmodel::Data< T >::getValue(), initDevice(), mrotation, sofa::defaulttype::Mat< L, C, real >::multTranspose(), sofa::helper::Quater< Real >::normalize(), pivot, scale, sofa::core::objectmodel::Data< T >::setValue(), sphereModel, sofa::helper::Quater< Real >::toMatrix(), and xform.
| SensAble::~SensAble | ( | ) |
Definition at line 231 of file SensAble.cpp.
| void SensAble::draw | ( | ) | [virtual] |
Render internal data of this object, for debugging purposes.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 403 of file SensAble.cpp.
References bDraw, bRenderPivot, currentForce, dot(), getData(), sofa::core::objectmodel::Data< T >::getValue(), sofa::component::MechanicalObject< DataTypes >::getX(), DeviceData::m_buttonState1, DeviceData::m_buttonState2, mrotation, sofa::defaulttype::Vec< N, real >::norm(), sofa::defaulttype::Vec< N, real >::normalize(), pivot, scale, sphereModel, DeviceData::transform, and xform.
| void SensAble::handleEvent | ( | sofa::core::objectmodel::Event * | e | ) | [virtual] |
Handle an event.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 211 of file SensAble.cpp.
References bRenderForce, and bRenderPivot.
| void SensAble::init | ( | void | ) | [virtual] |
Initialization method called at graph modification, during bottom-up traversal.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 237 of file SensAble.cpp.
References sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::BaseContext::getMechanicalState(), reinit(), and rigidModel.
Referenced by main().
| void SensAble::initTextures | ( | ) | [inline, virtual] |
Initialize the textures, or other graphical resources.
Reimplemented from sofa::core::VisualModel.
Definition at line 57 of file SensAble.h.
| void SensAble::reinit | ( | ) | [virtual] |
Update method called when variables used in precomputation are modified.
Reimplemented from sofa::core::objectmodel::BaseObject.
Definition at line 245 of file SensAble.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), mrotation, sofa::defaulttype::Mat< L, C, real >::multTranspose(), sofa::helper::Quater< Real >::normalize(), pivot, scale, sofa::helper::Quater< Real >::toMatrix(), xform, and xform2.
Referenced by init().
| void SensAble::update | ( | ) | [inline, virtual] |
used to update the model if necessary.
Reimplemented from sofa::core::VisualModel.
Definition at line 58 of file SensAble.h.
| void SensAble::updatePosition | ( | double | dt | ) | [virtual] |
Computation of a new simulation step.
Implements sofa::core::BehaviorModel.
Definition at line 267 of file SensAble.cpp.
References bRenderForce, button1State, button2State, currentForce, sofa::simulation::Node::execute(), flip, force, sofa::helper::Quater< Real >::fromMatrix(), sofa::core::objectmodel::BaseObject::getContext(), sofa::component::MechanicalObject< DataTypes >::getF(), sofa::simulation::tree::GNode::getParent(), sofa::core::objectmodel::Data< T >::getValue(), key1, key2, DeviceData::m_buttonState1, DeviceData::m_buttonState2, mrotation, sofa::simulation::Node::propagateEvent(), DeviceData::quat, rigidModel, scale, SetForceCallback(), sofa::component::collision::TSphereModel< TDataTypes >::setSphere(), sphereModel, tipOffset, sofa::helper::Quater< Real >::toMatrix(), DeviceData::transform, and xform.
| Data<bool> SensAble::bDraw |
| Data<bool> SensAble::flip |
| Data<char> SensAble::key1 |
| Data<char> SensAble::key2 |
Definition at line 73 of file SensAble.h.
Referenced by draw(), reinit(), SensAble(), and updatePosition().
Definition at line 62 of file SensAble.h.
| Data<double> SensAble::scale |
Definition at line 63 of file SensAble.h.
Referenced by draw(), reinit(), SensAble(), and updatePosition().
| Data<double> SensAble::tipOffset |
Definition at line 61 of file SensAble.h.
| Data<sofa::defaulttype::RigidTypes::Coord> SensAble::xform |
Definition at line 65 of file SensAble.h.
Referenced by draw(), reinit(), SensAble(), and updatePosition().
| Data<sofa::defaulttype::RigidTypes::Coord> SensAble::xform2 |
1.5.7.1