![]() |
Computer Assited Medical Intervention Tool Kit
version 4.0
|
The Animation Motor addon class. More...
#include <AnimationMotorAddon.h>
Public Member Functions | |
AnimationMotorAddon (LoadsManager *lm) | |
the default constructor get the loads manager (and thus the Physical model, ...) More... | |
virtual Loads * | doMove (double dt, double forcedTime=0.0)=0 |
This method is called everytime the motor has to do one step of simulation. More... | |
virtual QString | getDescription ()=0 |
get a simple description (can be rich text) More... | |
virtual QWidget * | getMotorWidget () |
get the optionnal operator widget if there the return value is not null, then the motor widget will be displayed as a new tab More... | |
virtual double | getTime () const =0 |
get the current motor internal time More... | |
virtual void | restart ()=0 |
start the simulation from the begining More... | |
virtual void | setBoundaryConditions (Loads *) |
set the initial loads (for boundary conditions) More... | |
virtual | ~AnimationMotorAddon () |
default virtual destructor More... | |
Protected Attributes | |
Loads * | boundaryConditions |
LoadsManager * | myLM |
The Animation Motor addon class.
All animation motor addon have to inherit from this class (which is an interface).
I highly recommand a look/study/thesis at/on the code of the ShakerAnimationMotorAddon class. It gives an good idea of all the different facets of a animation motor addon.
AnimationMotorAddon::AnimationMotorAddon | ( | LoadsManager * | lm | ) |
the default constructor get the loads manager (and thus the Physical model, ...)
References myLM.
|
inlinevirtual |
default virtual destructor
|
pure virtual |
This method is called everytime the motor has to do one step of simulation.
I.e. this method is called everytime the application needs to know the positions of the atoms at time t+dt.
Note: There are two possibilities for motors to produce deformations:
The latter is around 5% faster when a big percentage of the atoms are moving due to the action of the motor; consequently for a very low 3D refresh rate, the speed difference can become quite important. It is strongly advise to decrease the 3D refresh rate and use direct rendering.
The two methods are provided for convenience (sometimes it is easier to produce loads, and sometimes easier to directly modify the atom positions).
Again, see the artistic effect ShakerAnimationMotorAddon for more infos and examples (you could also use the shaker to check performances for your objects).
The Loads * boundaryConditions object can be used here to set initial boundary conditions.
The second paramater allows you to do more than one motor loop, if non zero it means that the motor can compute all the iterations up to time=forcedTime without producing any loads or updating any positions, making the motor faster.
dt | the delta-t to use in the motor |
forcedTime | the time at which the user wants a result |
Referenced by LoadsSimulation::doOneStep().
|
pure virtual |
get a simple description (can be rich text)
Referenced by LoadsSimulation::loadAddon().
|
virtual |
get the optionnal operator widget if there the return value is not null, then the motor widget will be displayed as a new tab
Referenced by LoadsSimulation::loadAddon().
|
pure virtual |
get the current motor internal time
Referenced by LoadsSimulation::doOneStep(), and LoadsSimulation::updateTime().
|
pure virtual |
start the simulation from the begining
Referenced by LoadsSimulation::rewind().
|
virtual |
set the initial loads (for boundary conditions)
References boundaryConditions.
|
protected |
Referenced by setBoundaryConditions().
|
protected |
Referenced by AnimationMotorAddon().