Animation
- class cee.ug.Animation()
 Handles animation of a
RemoteModelWith this class you can control state animations (animations across the states of the CAE analysis), particle trace animations and mode shape animations.
To start a state animation, specify the states to animate over with the
ModelSpec.stateIdArrayproperty and call [runAnimation].To start a particle trace animation, set the
particleTraceAnimationStepCountproperty and call [runParticleTraceAnimation]. Note that you must first create a particle trace by callingRemoteModel.addParticleTraceGroupTo start a mode shape animation, set the
ModelSpec.modeShapeAnimationTypeandModelSpec.modeShapeFrameCountproperties and then call [runAnimation]. Note that you must first set a displacement result on the model withModelSpec.displacementResultIdand thatModelSpec.stateIdArraymust contain exactly one state id.You can access the animation object from the remote model with the
RemoteModel.animationproperty.
Methods
Accessors
- cee.ug.Animation.particleTraceAnimationStepCount
 The number of steps to use for the particle trace animation.
The number of steps will be used to calculate the delta time for each step in the animation based on the total time of all active traces.
- cee.ug.Animation.targetFrameRate
 The target animation speed in frames per second (fps).
This will be the maximum animation speed, but the actual speed may be lower for large models or slow clients.
Methods
isAnyAnimationRunning
- cee.ug.Animation.isAnyAnimationRunning()
 Returns true if either a state, mode shape or particle trace animation is running
- Return type
 boolean
isModelAnimationRunning
- cee.ug.Animation.isModelAnimationRunning()
 Returns true if either a state or mode shape animation is running
- Return type
 boolean
runAnimation
- cee.ug.Animation.runAnimation(run)
 Starts a state (transient) or mode shape animation.
- Arguments
 run (
boolean) –
- Return type
 void
The steps are configured in the
ModelSpecof theRemoteModelTo start a state (transient) animations, set the states you would like to animate over with
ModelSpec.stateIdArrayThe order of the states in the animation will be the same as in the array. Note thatModelSpec.modeShapeFrameCountMUST be set to 0 for state (transient) animations.To start a mode shape animation, set the
ModelSpec.modeShapeAnimationTypeandModelSpec.modeShapeFrameCountproperties and then call [runAnimation]. Note that you must first set a displacement result on the model withModelSpec.displacementResultIdand thatModelSpec.stateIdArraymust contain exactly one state id.
runParticleTraceAnimation
- cee.ug.Animation.runParticleTraceAnimation(run)
 Starts a particle trace animation.
- Arguments
 run (
boolean) –
- Return type
 void
The number of steps to use for the animation can be set with
particleTraceAnimationStepCount
setAnimationFrameChangedCallback
- cee.ug.Animation.setAnimationFrameChangedCallback(animationFrameChangedCallback)
 Sets a handler function that will be called whenever a progress indication packet is received from the visualization server.
- Arguments
 animationFrameChangedCallback (
cee.ug.AnimationFrameChangedCallback) –
- Return type
 void
setFirstFrame
- cee.ug.Animation.setFirstFrame()
 Sets the first step of the animation (if any) as the current step. This will stop the animation.
- Return type
 void
setLastFrame
- cee.ug.Animation.setLastFrame()
 Sets the last step of the animation (if any) as the current step. This will stop the animation.
- Return type
 void
setNextFrame
- cee.ug.Animation.setNextFrame()
 Sets the next step of the animation (if any) as the current step, wrapping around to the first step if on the last step. This will stop the animation.
- Return type
 void
setPreviousFrame
- cee.ug.Animation.setPreviousFrame()
 Sets the previous step of the animation (if any) as the current step, wrapping around to the last step if on the first step. This will stop the animation.
- Return type
 void