Animation
Description
A class that represents an object animation.
Methods
resume | Resumes an animation from some point in the middle of the animation. |
start | Starts an animation. |
stop | Stops an animation. |
update | Updates an animation. |
Details
Animation.resume()
void resume( int resumeAtType = 0 , double resumeAtVal = 0 ) |
Parameters
resumeAtType | Used in conjuction with resumeAtVal to define where in the animation to resume. Can be one of the following values:
|
resumeAtVal | Only used if resumeAtType is RESUME_AT_TIME, in which case this value defines the time at which to resume. |
Description
Resumes an animation from some point in the middle of the animation.
current.animations["Walk"].resume();
Animation.start()
void start( int speedType = 0 , double speedValue = 0 , int repeatType = 0 , double repeatValue = 0 ) |
Parameters
speedType | Used in conjuction with speedValue to manipulate the speed with which the animation is run. Can be one of the following values:
|
speedValue | See speedType. |
repeatType | Used in conjunction with repeatValue to define how the animation will repeat. If not REPEAT_TYPE_DEFAULT, this will override the repeat type and value specified in the Animation Creator. Valid values are as follows:
|
repeatValue | See repeatType. |
Description
Starts an animation.
current.animations["Walk"].start();
Animation.update()
void update( double updateTime = -1 ) |
Parameters
updateTime | The simulation time on which to base the update. If not passed, it will update based on the current simulation time. |
Description
Updates an animation.
The method will update all of the positions of an object's animation components based on the update time and the keyframes defined in the animation. Usually you do not need to call this explicitly, since FlexSim's engine automatically updates active animations when it repaints any 3D windows. However, if your simulation logic is dependent on sub-component positions that change during an animation, you should call update() before getting those positions, or else the retrieved data will be based on the last time a window was repainted. This will cause different results with each simulation run.
current.animations["Walk"].update();