Hi,
The purpose of my question is to get some enlightening how to perform some actions during the simulation, and whether I’m doing it in a proper way.
Having some actions to be performed at each animation step, the AnimateBeginEvent
event can be used.
To this end, I write a class which inherits from BaseController
because the later inherits from BaseObject
which owns the virtual method virtual void handleEvent( Event* )
. Then, I cast the Event*
to one of [Animate/Collision/Integrate][Begin/End]Event
, and I reimplement the event handler in my sub-class component where I place the desired actions. Afterwards, I place the component in the simulation scene file at the top level node or I repeat it inside the sub nodes.
Is this an appropriate way? Could you enlighten me please?
Noura