#include <Node.h>


Component containers | |
| typedef Sequence < core::objectmodel::BaseObject > ::iterator | ObjectIterator |
| Sequence < core::objectmodel::BaseObject > | object |
| Single < core::componentmodel::behavior::MasterSolver > | masterSolver |
| Sequence < core::componentmodel::behavior::OdeSolver > | solver |
| Sequence < core::componentmodel::behavior::LinearSolver > | linearSolver |
| Single < core::componentmodel::behavior::BaseMechanicalState > | mechanicalState |
| Single < core::componentmodel::behavior::BaseMechanicalMapping > | mechanicalMapping |
| Single < core::componentmodel::behavior::BaseMass > | mass |
| Single < core::componentmodel::topology::Topology > | topology |
| Single < core::componentmodel::topology::BaseMeshTopology > | meshTopology |
| Single< sofa::core::Shader > | shader |
| Sequence < core::componentmodel::topology::BaseTopology > | basicTopology |
| Sequence < core::componentmodel::behavior::BaseForceField > | forceField |
| Sequence < core::componentmodel::behavior::InteractionForceField > | interactionForceField |
| Sequence < core::componentmodel::behavior::BaseConstraint > | constraint |
| Sequence < core::objectmodel::ContextObject > | contextObject |
| Sequence< core::BaseMapping > | mapping |
| Sequence< core::BehaviorModel > | behaviorModel |
| Sequence< core::VisualModel > | visualModel |
| Sequence< core::CollisionModel > | collisionModel |
| Single < core::componentmodel::collision::Pipeline > | collisionPipeline |
| Sequence < core::objectmodel::BaseObject > | unsorted |
Time management | |
| typedef helper::system::thread::ctime_t | ctime_t |
| void | setLogTime (bool) |
| bool | getLogTime () const |
| void | resetTime () |
| Reset time logs. | |
| const NodeTimer & | getTotalTime () const |
| Get total time log. | |
| const std::map< std::string, NodeTimer > & | getVisitorTime () const |
| Get time log of all categories. | |
| const NodeTimer & | getVisitorTime (const std::string &s) |
| Get time log of a given category. | |
| const NodeTimer & | getVisitorTime (const char *s) |
| Get time log of a given category. | |
| const std::map< std::string, std::map < core::objectmodel::BaseObject *, ObjectTimer > > & | getObjectTime () const |
| Get time log of all objects. | |
| const std::map < core::objectmodel::BaseObject *, ObjectTimer > & | getObjectTime (const std::string &s) |
| Get time log of all objects of a given category. | |
| const std::map < core::objectmodel::BaseObject *, ObjectTimer > & | getObjectTime (const char *s) |
| Get time log of all objects of a given category. | |
| ctime_t | getTimeFreq () const |
| Get timer frequency. | |
| ctime_t | startTime () const |
| Measure start time. | |
| virtual void | addTime (ctime_t t, const std::string &s, core::objectmodel::BaseObject *obj) |
| Log time spent on an action category and the concerned object. | |
| virtual ctime_t | endTime (ctime_t t0, const std::string &s, core::objectmodel::BaseObject *obj) |
| Log time spent given a start time, an action category, and the concerned object. | |
| virtual void | addTime (ctime_t t, const std::string &s, core::objectmodel::BaseObject *obj, core::objectmodel::BaseObject *parent) |
| Log time spent on an action category, and the concerned object, plus remove the computed time from the parent caller object. | |
| virtual ctime_t | endTime (ctime_t t0, const std::string &s, core::objectmodel::BaseObject *obj, core::objectmodel::BaseObject *parent) |
| Log time spent given a start time, an action category, and the concerned object, plus remove the computed time from the parent caller object. | |
Data Structures | |
| struct | NodeTimer |
| struct | ObjectTimer |
| class | Sequence |
| Sequence class to hold a list of objects. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end). More... | |
| class | Single |
| Class to hold 0-or-1 object. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end), plus an automatic convertion to one pointer. More... | |
Public Member Functions | |
| Node (const std::string &name="") | |
| virtual | ~Node () |
| Node * | setDebug (bool) |
| bool | getDebug () const |
| void | printComponents () |
| const BaseContext * | getContext () const |
| BaseContext * | getContext () |
| virtual void | updateContext () |
| Update the whole context values, based on parent and local ContextObjects. | |
| virtual void | updateSimulationContext () |
| Update the simulation context values(gravity, time...), based on parent and local ContextObjects. | |
| virtual void | initVisualContext () |
| Called during initialization to corectly propagate the visual context to the children. | |
| virtual void | propagateEvent (core::objectmodel::Event *event) |
| Propagate an event. | |
| virtual void | updateVisualContext (int FILTER=10) |
| Update the visual context values, based on parent and local ContextObjects. | |
| virtual void | initialize () |
| Must be called after each graph modification. Do not call it directly, apply an InitVisitor instead. | |
| virtual void | setDefaultVisualContextValue () |
| Called after initialization to set the default value of the visual context. | |
High-level interface | |
Initialize the components | |
| void | init () |
| Initialize the components of this node and all the nodes which depend on it. | |
| void | reinit () |
| Apply modifications to the components. | |
| void | animate (double dt) |
| Do one step forward in time. | |
| void | glDraw () |
| Draw the objects in an OpenGl context. | |
Visitor handling | |
| virtual void | doExecuteVisitor (Visitor *action)=0 |
| Execute a recursive action starting from this node. | |
| void | executeVisitor (simulation::Visitor *action) |
| Execute a recursive action starting from this node. | |
| void | execute (simulation::Visitor &action) |
| Execute a recursive action starting from this node. | |
| void | execute (simulation::Visitor *p) |
| Execute a recursive action starting from this node. | |
| template<class Act > | |
| void | execute () |
| Execute a recursive action starting from this node. | |
Set/get objects | |
| virtual bool | addObject (core::objectmodel::BaseObject *obj) |
| Add an object and return this. Detect the implemented interfaces and add the object to the corresponding lists. | |
| virtual bool | removeObject (core::objectmodel::BaseObject *obj) |
| Remove an object. | |
| virtual void | moveObject (core::objectmodel::BaseObject *obj) |
| Move an object from another node. | |
| core::objectmodel::BaseObject * | getObject (const std::string &name) const |
| Find an object given its name. | |
| template<class Object , class Container > | |
| void | getNodeObjects (Container *list) |
| List all objects of this node deriving from a given class. | |
| template<class Object > | |
| void | getNodeObject (Object *&result) |
| Return an object of this node deriving from a given class, or NULL if not found. | |
| template<class Object > | |
| Object * | getNodeObject () |
| template<class Object , class Container > | |
| void | getTreeObjects (Container *list) |
| List all objects of this node and sub-nodes deriving from a given class. | |
| template<class Object > | |
| void | getTreeObject (Object *&result) |
| Return an object of this node and sub-nodes deriving from a given class, or NULL if not found. | |
| template<class Object > | |
| Object * | getTreeObject () |
| virtual core::componentmodel::topology::Topology * | getTopology () const |
| Topology. | |
| virtual core::componentmodel::topology::BaseMeshTopology * | getMeshTopology () const |
| Mesh Topology (unified interface for both static and dynamic topologies). | |
| virtual core::objectmodel::BaseObject * | getMechanicalState () const |
| Mechanical Degrees-of-Freedom. | |
| virtual core::objectmodel::BaseObject * | getShader () const |
| Shader. | |
| virtual void | removeControllers () |
| Remove odesolvers and mastercontroler. | |
Dependency graph | |
This graph reflects the dependencies between the components.
It is used internally to ensure that the initialization order is comform to the dependencies. | |
| void | sortComponents () |
| Sort the components according to the dependencies expressed in Data depend. | |
Data Fields | |
| Single< VisitorScheduler > | actionScheduler |
| Data< sofa::helper::vector < std::string > > | depend |
| Pairs representing component dependencies. First must be initialized before second. | |
Protected Member Functions | |
| virtual void | doAddObject (core::objectmodel::BaseObject *obj) |
| Add an object. Detect the implemented interfaces and add the object to the corresponding lists. | |
| virtual void | doRemoveObject (core::objectmodel::BaseObject *obj) |
| Remove an object. | |
| virtual void | notifyAddObject (core::objectmodel::BaseObject *) |
| virtual void | notifyRemoveObject (core::objectmodel::BaseObject *) |
| virtual void | notifyMoveObject (core::objectmodel::BaseObject *, Node *) |
Protected Attributes | |
| bool | debug_ |
| bool | logTime_ |
| std::stack< Visitor * > | actionStack |
| BaseContext * | _context |
Performance Timing Log | |
| NodeTimer | totalTime |
| std::map< std::string, NodeTimer > | actionTime |
| std::map< std::string, std::map < core::objectmodel::BaseObject *, ObjectTimer > > | objectTime |
Friends | |
| class | VisitorScheduler |
Contains objects in lists and provides accessors. The other nodes are not visible (unknown scene graph).
Definition at line 89 of file Node.h.
| typedef Sequence<core::objectmodel::BaseObject>::iterator sofa::simulation::Node::ObjectIterator |
| sofa::simulation::Node::Node | ( | const std::string & | name = "" |
) |
Definition at line 60 of file Node.cpp.
References _context, sofa::simulation::Node::NodeTimer::nVisit, sofa::core::objectmodel::Base::setName(), sofa::simulation::Node::NodeTimer::tNode, totalTime, and sofa::simulation::Node::NodeTimer::tTree.
| bool sofa::simulation::Node::addObject | ( | core::objectmodel::BaseObject * | obj | ) | [virtual] |
Add an object and return this. Detect the implemented interfaces and add the object to the corresponding lists.
Add an object. Detect the implemented interfaces and add the object to the corresponding lists.
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 113 of file Node.cpp.
References doAddObject(), and notifyAddObject().
Referenced by sofa::component::misc::CompareStateCreator::addCompareState(), sofa::component::misc::ReadStateCreator::addReadState(), sofa::component::misc::WriteStateCreator::addWriteState(), moveObject(), and sortComponents().
| void sofa::simulation::Node::addTime | ( | ctime_t | t, | |
| const std::string & | s, | |||
| core::objectmodel::BaseObject * | obj, | |||
| core::objectmodel::BaseObject * | parent | |||
| ) | [virtual] |
Log time spent on an action category, and the concerned object, plus remove the computed time from the parent caller object.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 307 of file Node.cpp.
References sofa::simulation::Node::ObjectTimer::nVisit, objectTime, and sofa::simulation::Node::ObjectTimer::tObject.
| void sofa::simulation::Node::addTime | ( | ctime_t | t, | |
| const std::string & | s, | |||
| core::objectmodel::BaseObject * | obj | |||
| ) | [virtual] |
Log time spent on an action category and the concerned object.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 289 of file Node.cpp.
References sofa::simulation::Node::ObjectTimer::nVisit, objectTime, and sofa::simulation::Node::ObjectTimer::tObject.
Referenced by sofa::component::collision::BruteForceDetection::addCollisionPair(), and endTime().
| void sofa::simulation::Node::animate | ( | double | dt | ) |
| void sofa::simulation::Node::doAddObject | ( | core::objectmodel::BaseObject * | obj | ) | [protected, virtual] |
Add an object. Detect the implemented interfaces and add the object to the corresponding lists.
Definition at line 157 of file Node.cpp.
References actionScheduler, sofa::simulation::Node::Single< T >::add(), behaviorModel, collisionModel, collisionPipeline, constraint, contextObject, forceField, interactionForceField, linearSolver, mapping, mass, masterSolver, mechanicalMapping, mechanicalState, meshTopology, notifyAddObject(), sofa::core::objectmodel::BaseObject::setContext(), shader, solver, topology, unsorted, and visualModel.
Referenced by addObject(), and moveObject().
| virtual void sofa::simulation::Node::doExecuteVisitor | ( | Visitor * | action | ) | [pure virtual] |
Execute a recursive action starting from this node.
This method bypasses the actionScheduler of this node if any.
Implemented in sofa::simulation::tree::GNode.
Referenced by sofa::simulation::VisitorScheduler::doExecuteVisitor(), and executeVisitor().
| void sofa::simulation::Node::doRemoveObject | ( | core::objectmodel::BaseObject * | obj | ) | [protected, virtual] |
Remove an object.
Definition at line 197 of file Node.cpp.
References actionScheduler, behaviorModel, collisionModel, collisionPipeline, constraint, contextObject, forceField, sofa::core::objectmodel::BaseObject::getContext(), interactionForceField, linearSolver, mapping, mass, masterSolver, mechanicalMapping, mechanicalState, meshTopology, objectTime, sofa::simulation::Node::Single< T >::remove(), sofa::core::objectmodel::BaseObject::setContext(), shader, solver, topology, and visualModel.
Referenced by moveObject(), and removeObject().
| Node::ctime_t sofa::simulation::Node::endTime | ( | ctime_t | t0, | |
| const std::string & | s, | |||
| core::objectmodel::BaseObject * | obj, | |||
| core::objectmodel::BaseObject * | parent | |||
| ) | [virtual] |
Log time spent given a start time, an action category, and the concerned object, plus remove the computed time from the parent caller object.
Log time spent given a start time, an action category, and the concerned object.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 317 of file Node.cpp.
References getLogTime(), and sofa::core::objectmodel::Context::getTime().
| Node::ctime_t sofa::simulation::Node::endTime | ( | ctime_t | t0, | |
| const std::string & | s, | |||
| core::objectmodel::BaseObject * | obj | |||
| ) | [virtual] |
Log time spent given a start time, an action category, and the concerned object.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 297 of file Node.cpp.
References addTime(), getLogTime(), and sofa::core::objectmodel::Context::getTime().
Referenced by sofa::component::collision::DefaultPipeline::doCollisionDetection(), sofa::simulation::Visitor::end(), sofa::simulation::Visitor::for_each(), and sofa::simulation::Visitor::for_each_r().
| void sofa::simulation::Node::execute | ( | ) | [inline] |
Execute a recursive action starting from this node.
Definition at line 134 of file Node.h.
References executeVisitor().
Referenced by animate().
| void sofa::simulation::Node::execute | ( | simulation::Visitor * | p | ) | [inline] |
Execute a recursive action starting from this node.
Definition at line 127 of file Node.h.
References executeVisitor().
| void sofa::simulation::Node::execute | ( | simulation::Visitor & | action | ) | [inline] |
Execute a recursive action starting from this node.
Definition at line 120 of file Node.h.
References executeVisitor().
Referenced by sofa::simulation::tree::Simulation::animate(), sofa::filemanager::pml::PMLReader::BuildStructure(), sofa::gui::qt::RealGUI::clearRecord(), sofa::simulation::tree::Simulation::computeBBox(), sofa::gui::qt::RealGUI::CreateGUI(), sofa::gui::glut::SimpleGUI::CreateGUI(), sofa::simulation::tree::Simulation::draw(), sofa::simulation::tree::Simulation::drawShadows(), sofa::simulation::tree::Simulation::exportGnuplot(), sofa::simulation::tree::Simulation::exportOBJ(), sofa::simulation::tree::Simulation::exportXML(), sofa::simulation::MechanicalIntegrationVisitor::fwdOdeSolver(), sofa::simulation::tree::Simulation::getInstruments(), sofa::simulation::tree::Simulation::init(), SofaFlowVR::FlowVRInputMesh::init(), sofa::simulation::tree::Simulation::initGnuplot(), sofa::simulation::tree::Simulation::initTextures(), sofa::gui::qt::RealGUI::loadObject(), sofa::gui::qt::RealGUI::loadSimulation(), sofa::simulation::tree::Simulation::print(), sofa::simulation::tree::Simulation::printXML(), sofa::simulation::AnimateVisitor::processCollisionPipeline(), sofa::simulation::AnimateVisitor::processNodeTopDown(), sofa::simulation::tree::Simulation::reset(), sofa::gui::qt::RealGUI::setScene(), sofa::component::odesolver::MasterContactSolver::step(), sofa::simulation::tree::Simulation::unload(), sofa::simulation::tree::Simulation::updateContext(), sofa::gui::qt::ModifyObject::updateContext(), SensAble::updatePosition(), and SofaFlowVR::FlowVRInputMesh::~FlowVRInputMesh().
| void sofa::simulation::Node::executeVisitor | ( | simulation::Visitor * | action | ) | [virtual] |
Execute a recursive action starting from this node.
Reimplemented from sofa::core::objectmodel::BaseContext.
Definition at line 494 of file Node.cpp.
References actionScheduler, doExecuteVisitor(), sofa::core::objectmodel::Data< T >::getValue(), and sofa::core::objectmodel::Context::is_activated.
Referenced by sofa::gui::qt::GenGraphForm::doExport(), execute(), and propagateEvent().
| core::objectmodel::BaseContext * sofa::simulation::Node::getContext | ( | ) |
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 351 of file Node.cpp.
References _context.
| const core::objectmodel::BaseContext * sofa::simulation::Node::getContext | ( | ) | const |
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 355 of file Node.cpp.
References _context.
Referenced by sofa::component::misc::CompareStateCreator::addCompareState(), sofa::component::misc::ReadStateCreator::addReadState(), sofa::component::misc::WriteStateCreator::addWriteState(), sofa::simulation::tree::Simulation::init(), sofa::gui::qt::RealGUI::setDt(), sofa::gui::qt::RealGUI::setScene(), and sofa::gui::qt::RealGUI::showhideElements().
| bool sofa::simulation::Node::getDebug | ( | ) | const |
| bool sofa::simulation::Node::getLogTime | ( | ) | const [inline] |
Definition at line 399 of file Node.h.
References logTime_.
Referenced by sofa::component::collision::BruteForceDetection::addCollisionPair(), sofa::component::collision::DefaultCollisionGroupManager::createGroups(), sofa::component::collision::DefaultPipeline::doCollisionDetection(), sofa::component::collision::DefaultPipeline::doCollisionReset(), sofa::component::collision::DefaultPipeline::doCollisionResponse(), sofa::simulation::tree::GNode::doExecuteVisitor(), sofa::simulation::tree::GNode::endTime(), endTime(), sofa::simulation::tree::GNodeVisitor::for_each(), sofa::simulation::Visitor::for_each(), sofa::simulation::tree::GNodeVisitor::for_each_r(), sofa::simulation::Visitor::for_each_r(), startTime(), updateContext(), updateSimulationContext(), and updateVisualContext().
| core::objectmodel::BaseObject * sofa::simulation::Node::getMechanicalState | ( | void | ) | const [virtual] |
Mechanical Degrees-of-Freedom.
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 256 of file Node.cpp.
References mechanicalState.
Referenced by sofa::component::misc::CompareStateCreator::processNodeTopDown().
| core::componentmodel::topology::BaseMeshTopology * sofa::simulation::Node::getMeshTopology | ( | ) | const [virtual] |
Mesh Topology (unified interface for both static and dynamic topologies).
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 244 of file Node.cpp.
References meshTopology.
| Object* sofa::simulation::Node::getNodeObject | ( | ) | [inline] |
| void sofa::simulation::Node::getNodeObject | ( | Object *& | result | ) | [inline] |
Return an object of this node deriving from a given class, or NULL if not found.
Note that only the first object is returned.
Definition at line 346 of file Node.h.
References sofa::core::objectmodel::BaseContext::Local.
Referenced by sofa::component::mapping::SPHFluidSurfaceMapping< In, Out >::init(), sofa::component::mapping::ArticulatedSystemMapping< BasicMapping >::init(), and SofaFlowVR::FlowVRInputDistanceGrid< DistanceGridModel, DistanceGrid >::init().
| void sofa::simulation::Node::getNodeObjects | ( | Container * | list | ) | [inline] |
List all objects of this node deriving from a given class.
Definition at line 338 of file Node.h.
References sofa::core::objectmodel::BaseContext::Local.
| core::objectmodel::BaseObject * sofa::simulation::Node::getObject | ( | const std::string & | name | ) | const |
Find an object given its name.
Definition at line 146 of file Node.cpp.
Referenced by sortComponents().
| const std::map<core::objectmodel::BaseObject*, ObjectTimer>& sofa::simulation::Node::getObjectTime | ( | const char * | s | ) | [inline] |
Get time log of all objects of a given category.
Definition at line 438 of file Node.h.
References objectTime.
| const std::map<core::objectmodel::BaseObject*, ObjectTimer>& sofa::simulation::Node::getObjectTime | ( | const std::string & | s | ) | [inline] |
Get time log of all objects of a given category.
Definition at line 435 of file Node.h.
References objectTime.
| const std::map<std::string, std::map<core::objectmodel::BaseObject*, ObjectTimer> >& sofa::simulation::Node::getObjectTime | ( | ) | const [inline] |
Get time log of all objects.
Definition at line 432 of file Node.h.
References objectTime.
Referenced by sofa::gui::qt::RealGUI::eventNewStep(), and sofa::gui::glut::SimpleGUI::eventNewStep().
| core::objectmodel::BaseObject * sofa::simulation::Node::getShader | ( | ) | const [virtual] |
Shader.
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 250 of file Node.cpp.
References shader.
Referenced by sofa::simulation::VisualDrawVisitor::processNodeTopDown(), and sofa::simulation::VisualDrawVisitor::processVisualModel().
| Node::ctime_t sofa::simulation::Node::getTimeFreq | ( | ) | const |
Get timer frequency.
Definition at line 267 of file Node.cpp.
References sofa::helper::system::thread::CTime::getTicksPerSec().
Referenced by sofa::gui::qt::RealGUI::eventNewStep(), and sofa::gui::glut::SimpleGUI::eventNewStep().
| core::componentmodel::topology::Topology * sofa::simulation::Node::getTopology | ( | ) | const [virtual] |
Topology.
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 238 of file Node.cpp.
References topology.
| const NodeTimer& sofa::simulation::Node::getTotalTime | ( | ) | const [inline] |
Get total time log.
Definition at line 420 of file Node.h.
References totalTime.
Referenced by sofa::gui::qt::RealGUI::eventNewStep(), and sofa::gui::glut::SimpleGUI::eventNewStep().
| Object* sofa::simulation::Node::getTreeObject | ( | ) | [inline] |
| void sofa::simulation::Node::getTreeObject | ( | Object *& | result | ) | [inline] |
Return an object of this node and sub-nodes deriving from a given class, or NULL if not found.
Note that only the first object is returned.
Definition at line 367 of file Node.h.
References sofa::core::objectmodel::BaseContext::SearchDown.
Referenced by sofa::component::controller::ArticulatedHierarchyBVHController::init().
| void sofa::simulation::Node::getTreeObjects | ( | Container * | list | ) | [inline] |
List all objects of this node and sub-nodes deriving from a given class.
Definition at line 359 of file Node.h.
References sofa::core::objectmodel::BaseContext::SearchDown.
Referenced by sofa::component::controller::ArticulatedHierarchyController::applyController(), sofa::component::controller::ArticulatedHierarchyBVHController::applyController(), sofa::simulation::PipelineImpl::computeCollisionDetection(), sofa::component::collision::DefaultContactManager::createContacts(), sofa::gui::qt::viewer::qtogre::QtOgreViewer::createScene(), sofa::simulation::PipelineImpl::init(), sofa::component::controller::EnslavementForceFeedback::init(), sofa::component::controller::ArticulatedHierarchyController::init(), sofa::component::controller::ArticulatedHierarchyBVHController::init(), sofa::component::container::ArticulatedHierarchyContainer::init(), sofa::gui::glut::SimpleGUI::mouseEvent(), sofa::gui::qt::viewer::SofaViewer::moveLaparoscopic(), and sofa::gui::qt::viewer::qtogre::QtOgreViewer::showEntireScene().
| const NodeTimer& sofa::simulation::Node::getVisitorTime | ( | const char * | s | ) | [inline] |
| const NodeTimer& sofa::simulation::Node::getVisitorTime | ( | const std::string & | s | ) | [inline] |
| const std::map<std::string, NodeTimer>& sofa::simulation::Node::getVisitorTime | ( | ) | const [inline] |
Get time log of all categories.
Definition at line 423 of file Node.h.
References actionTime.
Referenced by sofa::gui::qt::RealGUI::eventNewStep(), and sofa::gui::glut::SimpleGUI::eventNewStep().
| void sofa::simulation::Node::glDraw | ( | ) |
| void sofa::simulation::Node::init | ( | void | ) |
Initialize the components of this node and all the nodes which depend on it.
Definition at line 78 of file Node.cpp.
Referenced by sofa::gui::qt::RealGUI::graphActivateNode().
| void sofa::simulation::Node::initialize | ( | ) | [virtual] |
Must be called after each graph modification. Do not call it directly, apply an InitVisitor instead.
Definition at line 382 of file Node.cpp.
References initVisualContext(), sortComponents(), and updateSimulationContext().
Referenced by sofa::simulation::InitVisitor::processNodeTopDown().
| virtual void sofa::simulation::Node::initVisualContext | ( | ) | [inline, virtual] |
Called during initialization to corectly propagate the visual context to the children.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 488 of file Node.h.
Referenced by initialize().
| void sofa::simulation::Node::moveObject | ( | core::objectmodel::BaseObject * | obj | ) | [virtual] |
Move an object from another node.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 129 of file Node.cpp.
References addObject(), doAddObject(), doRemoveObject(), sofa::core::objectmodel::BaseObject::getContext(), notifyMoveObject(), and sofa::core::objectmodel::BaseContext::removeObject().
| virtual void sofa::simulation::Node::notifyAddObject | ( | core::objectmodel::BaseObject * | ) | [inline, protected, virtual] |
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 525 of file Node.h.
Referenced by addObject(), and doAddObject().
| virtual void sofa::simulation::Node::notifyMoveObject | ( | core::objectmodel::BaseObject * | , | |
| Node * | ||||
| ) | [inline, protected, virtual] |
| virtual void sofa::simulation::Node::notifyRemoveObject | ( | core::objectmodel::BaseObject * | ) | [inline, protected, virtual] |
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 526 of file Node.h.
Referenced by removeObject().
| void sofa::simulation::Node::printComponents | ( | ) |
Definition at line 514 of file Node.cpp.
References actionScheduler, sofa::simulation::Node::Single< T >::begin(), behaviorModel, collisionModel, collisionPipeline, constraint, contextObject, sofa::simulation::Node::Single< T >::end(), forceField, interactionForceField, linearSolver, mapping, masterSolver, mechanicalMapping, mechanicalState, meshTopology, shader, solver, topology, and visualModel.
| void sofa::simulation::Node::propagateEvent | ( | core::objectmodel::Event * | event | ) | [virtual] |
Propagate an event.
Reimplemented from sofa::core::objectmodel::BaseContext.
Definition at line 504 of file Node.cpp.
References executeVisitor().
Referenced by sofa::gui::qt::viewer::qtogre::QtOgreViewer::keyPressEvent(), sofa::gui::qt::viewer::qt::QtViewer::keyPressEvent(), sofa::gui::qt::viewer::qgl::QtGLViewer::keyPressEvent(), sofa::gui::glut::SimpleGUI::keyPressEvent(), sofa::gui::qt::viewer::SofaViewer::keyReleaseEvent(), sofa::gui::glut::SimpleGUI::keyReleaseEvent(), sofa::gui::qt::viewer::SofaViewer::moveLaparoscopic(), and SensAble::updatePosition().
| void sofa::simulation::Node::reinit | ( | ) |
Apply modifications to the components.
ReInitialize the components of this node and all the nodes which depend on it.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 86 of file Node.cpp.
References sofa::simulation::Visitor::execute(), and sofa::core::objectmodel::Context::isActive().
| void sofa::simulation::Node::removeControllers | ( | ) | [virtual] |
Remove odesolvers and mastercontroler.
Definition at line 341 of file Node.cpp.
References masterSolver, removeObject(), and solver.
| bool sofa::simulation::Node::removeObject | ( | core::objectmodel::BaseObject * | obj | ) | [virtual] |
Remove an object.
Reimplemented from sofa::core::objectmodel::BaseContext.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 121 of file Node.cpp.
References doRemoveObject(), and notifyRemoveObject().
Referenced by removeControllers(), and sortComponents().
| void sofa::simulation::Node::resetTime | ( | ) |
Reset time logs.
Definition at line 272 of file Node.cpp.
References actionTime, sofa::simulation::Node::NodeTimer::nVisit, objectTime, sofa::simulation::Node::NodeTimer::tNode, totalTime, and sofa::simulation::Node::NodeTimer::tTree.
Referenced by sofa::gui::qt::RealGUI::eventNewStep(), and sofa::gui::glut::SimpleGUI::eventNewStep().
| void sofa::simulation::Node::setDefaultVisualContextValue | ( | ) | [virtual] |
Called after initialization to set the default value of the visual context.
Definition at line 368 of file Node.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), sofa::core::objectmodel::Data< T >::setValue(), sofa::core::objectmodel::Context::showBehaviorModels_, sofa::core::objectmodel::Context::showBoundingCollisionModels_, sofa::core::objectmodel::Context::showCollisionModels_, sofa::core::objectmodel::Context::showForceFields_, sofa::core::objectmodel::Context::showInteractionForceFields_, sofa::core::objectmodel::Context::showMappings_, sofa::core::objectmodel::Context::showMechanicalMappings_, sofa::core::objectmodel::Context::showNormals_, sofa::core::objectmodel::Context::showVisualModels_, and sofa::core::objectmodel::Context::showWireFrame_.
Referenced by sofa::simulation::InitVisitor::processNodeBottomUp().
| void sofa::simulation::Node::setLogTime | ( | bool | b | ) |
Definition at line 262 of file Node.cpp.
References logTime_.
Referenced by sofa::gui::qt::RealGUI::displayComputationTime(), and sofa::gui::glut::SimpleGUI::displayComputationTime().
| void sofa::simulation::Node::sortComponents | ( | ) |
Sort the components according to the dependencies expressed in Data depend.
Definition at line 599 of file Node.cpp.
References addObject(), depend, sofa::core::objectmodel::BaseContext::get(), getObject(), sofa::core::objectmodel::Data< T >::getValue(), and removeObject().
Referenced by initialize().
| Node::ctime_t sofa::simulation::Node::startTime | ( | ) | const |
Measure start time.
Definition at line 282 of file Node.cpp.
References getLogTime(), and sofa::core::objectmodel::Context::getTime().
Referenced by sofa::component::collision::GridCell::add(), sofa::component::collision::BruteForceDetection::addCollisionPair(), sofa::simulation::Visitor::begin(), sofa::component::collision::DefaultCollisionGroupManager::createGroups(), sofa::component::collision::DefaultPipeline::doCollisionDetection(), sofa::component::collision::DefaultPipeline::doCollisionReset(), sofa::component::collision::DefaultPipeline::doCollisionResponse(), sofa::simulation::tree::GNodeVisitor::for_each(), sofa::simulation::Visitor::for_each(), sofa::simulation::tree::GNodeVisitor::for_each_r(), and sofa::simulation::Visitor::for_each_r().
| void sofa::simulation::Node::updateContext | ( | ) | [virtual] |
Update the whole context values, based on parent and local ContextObjects.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 415 of file Node.cpp.
References contextObject, debug_, getLogTime(), and sofa::core::objectmodel::Base::getName().
Referenced by sofa::simulation::UpdateContextVisitor::processNodeTopDown().
| void sofa::simulation::Node::updateSimulationContext | ( | ) | [virtual] |
Update the simulation context values(gravity, time...), based on parent and local ContextObjects.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 449 of file Node.cpp.
References contextObject, debug_, getLogTime(), and sofa::core::objectmodel::Base::getName().
Referenced by initialize(), sofa::simulation::UpdateSimulationContextVisitor::processNodeTopDown(), sofa::simulation::MechanicalPropagateFreePositionVisitor::processNodeTopDown(), and sofa::simulation::MechanicalPropagatePositionAndVelocityVisitor::processNodeTopDown().
| void sofa::simulation::Node::updateVisualContext | ( | int | FILTER = 10 |
) | [virtual] |
Update the visual context values, based on parent and local ContextObjects.
Reimplemented in sofa::simulation::tree::GNode.
Definition at line 471 of file Node.cpp.
References contextObject, debug_, getLogTime(), and sofa::core::objectmodel::Base::getName().
Referenced by sofa::simulation::UpdateVisualContextVisitor::processNodeTopDown().
friend class VisitorScheduler [friend] |
BaseContext* sofa::simulation::Node::_context [protected] |
Definition at line 496 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), executeVisitor(), printComponents(), and sofa::simulation::tree::ParallelVisitorScheduler::recursiveClone().
std::stack<Visitor*> sofa::simulation::Node::actionStack [protected] |
Definition at line 524 of file Node.h.
Referenced by sofa::simulation::tree::GNode::doExecuteVisitor().
std::map<std::string, NodeTimer> sofa::simulation::Node::actionTime [protected] |
Definition at line 515 of file Node.h.
Referenced by sofa::simulation::tree::GNode::doExecuteVisitor(), getVisitorTime(), and resetTime().
| Sequence<core::componentmodel::topology::BaseTopology> sofa::simulation::Node::basicTopology |
Definition at line 311 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::PrintVisitor::processNodeTopDown(), and sofa::simulation::BehaviorUpdatePositionVisitor::processNodeTopDown().
Definition at line 313 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), SofaFlowVR::FlowVRInputMesh::flowvrBeginIteration(), printComponents(), and sofa::simulation::PrintVisitor::processNodeTopDown().
Definition at line 315 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::ExportDotVisitor::getParentName(), printComponents(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::CollisionVisitor::processNodeTopDown(), and sofa::simulation::AnimateVisitor::processNodeTopDown().
Definition at line 307 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::MechanicalVisitor::processNodeBottomUp(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), and sofa::filemanager::pml::LMLReader::updateStructure().
Definition at line 308 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::PrintVisitor::processNodeTopDown(), updateContext(), updateSimulationContext(), and updateVisualContext().
bool sofa::simulation::Node::debug_ [protected] |
Definition at line 508 of file Node.h.
Referenced by getDebug(), setDebug(), updateContext(), updateSimulationContext(), and updateVisualContext().
| Data< sofa::helper::vector < std::string > > sofa::simulation::Node::depend |
Pairs representing component dependencies. First must be initialized before second.
Definition at line 534 of file Node.h.
Referenced by sortComponents().
Definition at line 305 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), sofa::gui::qt::ModifyObject::updateEnergy(), and sofa::filemanager::pml::LMLReader::updateStructure().
| Sequence<core::componentmodel::behavior::InteractionForceField> sofa::simulation::Node::interactionForceField |
Definition at line 306 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), and sofa::simulation::AnimateVisitor::processNodeTopDown().
Definition at line 294 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), and printComponents().
bool sofa::simulation::Node::logTime_ [protected] |
Definition at line 310 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::UpdateMappingVisitor::processNodeTopDown(), and sofa::simulation::PrintVisitor::processNodeTopDown().
Definition at line 297 of file Node.h.
Referenced by sofa::component::constraint::UncoupledConstraintCorrection< TDataTypes >::applyContactForce(), doAddObject(), doRemoveObject(), sofa::component::constraint::UncoupledConstraintCorrection< TDataTypes >::getCompliance(), sofa::component::misc::WriteState::handleEvent(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), sofa::simulation::ExportGnuplotVisitor::processNodeTopDown(), sofa::simulation::InitGnuplotVisitor::processNodeTopDown(), and sofa::gui::qt::ModifyObject::updateEnergy().
Definition at line 292 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::ExportDotVisitor::getParentName(), printComponents(), sofa::simulation::AnimateVisitor::processNodeTopDown(), and removeControllers().
| Single<core::componentmodel::behavior::BaseMechanicalMapping> sofa::simulation::Node::mechanicalMapping |
Definition at line 296 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::ExportDotVisitor::getParentName(), printComponents(), sofa::simulation::MechanicalVisitor::processNodeBottomUp(), sofa::simulation::MechanicalMatrixVisitor::processNodeBottomUp(), sofa::simulation::XMLPrintVisitor::processNodeTopDown(), sofa::simulation::UpdateMappingVisitor::processNodeTopDown(), sofa::simulation::StateChangeVisitor::processNodeTopDown(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVDotVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), and sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown().
Definition at line 295 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::GNode::getMechanicalState(), getMechanicalState(), sofa::simulation::tree::ExportDotVisitor::getParentName(), printComponents(), sofa::simulation::MechanicalVisitor::processNodeBottomUp(), sofa::simulation::MechanicalMatrixVisitor::processNodeBottomUp(), sofa::simulation::VisualComputeBBoxVisitor::processNodeTopDown(), sofa::simulation::VelocityThresholdVisitor::processNodeTopDown(), sofa::simulation::TransformationVisitor::processNodeTopDown(), sofa::simulation::StateChangeVisitor::processNodeTopDown(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVPrintWithElapsedTimeVisitor::processNodeTopDown(), sofa::simulation::MechanicalVPrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVDotVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), sofa::simulation::ExportGnuplotVisitor::processNodeTopDown(), and sofa::simulation::InitGnuplotVisitor::processNodeTopDown().
Definition at line 299 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::GNode::getMeshTopology(), getMeshTopology(), and printComponents().
Definition at line 289 of file Node.h.
Referenced by sofa::simulation::tree::MutationListener::addChild(), sofa::component::collision::DefaultCollisionGroupManager::clearGroups(), sofa::component::collision::TopologicalChangeManager::incisionTriangleModel(), sofa::gui::qt::RealGUI::loadObject(), sofa::simulation::tree::DeleteVisitor::processNodeBottomUp(), sofa::simulation::XMLPrintVisitor::processNodeBottomUp(), sofa::simulation::InitVisitor::processNodeBottomUp(), sofa::simulation::tree::ExportDotVisitor::processNodeTopDown(), sofa::simulation::tree::CleanupVisitor::processNodeTopDown(), sofa::simulation::XMLPrintVisitor::processNodeTopDown(), sofa::simulation::WriteStateVisitor::processNodeTopDown(), sofa::simulation::VisualVisitor::processNodeTopDown(), sofa::simulation::TopologyChangeVisitor::processNodeTopDown(), sofa::simulation::StoreResetStateVisitor::processNodeTopDown(), sofa::simulation::ResetVisitor::processNodeTopDown(), sofa::simulation::PropagateEventVisitor::processNodeTopDown(), sofa::simulation::InitVisitor::processNodeTopDown(), sofa::simulation::FindByTypeVisitor< T >::processNodeTopDown(), sofa::simulation::tree::MutationListener::removeChild(), and sofa::component::collision::TopologicalChangeManager::removeItemsFromTriangleModel().
std::map<std::string, std::map<core::objectmodel::BaseObject*, ObjectTimer> > sofa::simulation::Node::objectTime [protected] |
Definition at line 516 of file Node.h.
Referenced by sofa::simulation::tree::GNode::addTime(), addTime(), doRemoveObject(), getObjectTime(), and resetTime().
Definition at line 300 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::GNode::getShader(), getShader(), and printComponents().
Definition at line 293 of file Node.h.
Referenced by sofa::component::collision::DefaultCollisionGroupManager::createGroups(), doAddObject(), doRemoveObject(), sofa::component::collision::DefaultCollisionGroupManager::getIntegrationNode(), sofa::simulation::tree::ExportDotVisitor::getParentName(), sofa::simulation::MasterSolverImpl::getSolverSequence(), printComponents(), sofa::simulation::MechanicalVisitor::processNodeBottomUp(), sofa::simulation::MechanicalMatrixVisitor::processNodeBottomUp(), sofa::simulation::SolveVisitor::processNodeTopDown(), sofa::simulation::PrintVisitor::processNodeTopDown(), sofa::simulation::MechanicalVisitor::processNodeTopDown(), sofa::simulation::MechanicalMatrixVisitor::processNodeTopDown(), sofa::simulation::AnimateVisitor::processNodeTopDown(), and removeControllers().
Definition at line 298 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), sofa::simulation::tree::GNode::getTopology(), getTopology(), printComponents(), and sofa::simulation::PrintVisitor::processNodeTopDown().
NodeTimer sofa::simulation::Node::totalTime [protected] |
Definition at line 514 of file Node.h.
Referenced by sofa::simulation::tree::GNode::doExecuteVisitor(), getTotalTime(), Node(), and resetTime().
Definition at line 316 of file Node.h.
Referenced by doAddObject(), and sofa::simulation::PrintVisitor::processNodeTopDown().
Definition at line 312 of file Node.h.
Referenced by doAddObject(), doRemoveObject(), printComponents(), sofa::simulation::VisualDrawVisitor::processNodeBottomUp(), sofa::simulation::VisualComputeBBoxVisitor::processNodeTopDown(), sofa::simulation::VisualVisitor::processNodeTopDown(), sofa::simulation::VisualDrawVisitor::processNodeTopDown(), sofa::simulation::TransformationVisitor::processNodeTopDown(), sofa::simulation::PrintVisitor::processNodeTopDown(), and sofa::simulation::ExportOBJVisitor::processNodeTopDown().
1.5.7.1