SEARCH
TOOLBOX
LANGUAGES
AnimationLoop

AnimationLoop

From SOFAWiki

Jump to: navigation, search
AnimationLoop and older MasterSolvers

Previous design

In the old design, there do not existe a component named DefaultAnimationLoop. All are managed in the class Simulation. In one time step, everything which is not visual aspect are processed in Simulation::animate(). In this old way, an essential component called AnimateVisitor occur every modules in the scene graph and launch the nomal computation processes. If this AnimateVisitor accross an MasterSolver component, this "normal way" breaks and gives the hand to the MasterSolver. The MasterSolver then will launch several Visitors and compute other things for collision process by its specific process. This structure make irregular the classes hierarchies structure and hardunderstand the process in the view point of user.

Image:NewDesignMasterSolver.png

New design

The main idea is fusioning the normal process and a specific process by an abstract process (will be called AnimationLoop), and make appear a configurable component in the scene graph. Thus, an user in scene level can configure his own loop management. Everything who launch a computational process will be an AnimationLoop. So every older components named *MasterSolver* will be called *AnimationLoop* (ex. FreeMotionMasterSolver becomes FreeMotionAnimationLoop). And everything like namespace and inherited classes changes by the same way. A component called DefaultAnimationLooop is implemented and will be created, added by default if no AnimationLoop componennt existe in the root context of scene graph. This component launch simply the normal (default) animation process as before.