Model.StartAnimation Method

Starts the animation timer. After calling this method the Animate method of all the entities is called periodically to allow the computation of the new entity position.

To animate group of entities the approach is the following:

  1. Create groups of moving objects (using Block class and adding entities to the Block.Entities collection)
  2. Add blocks created at point 1) to the Environment.Blocks collection
  3. Subclass the BlockReference class for each moving group of objects
  4. Override the BlockReference.Animate() method of the class at point 3) and add the code to compute the data for entities transformation at that specific time frame
  5. Override the BlockReference.MoveTo() method of the class at point 3) and add the code to move the objects on the GPU
  6. Override the BlockReference.IsInFrustum() method of the class at point 3) and return true without calling the base to avoid undesired clipping. It might be necessary to override also the bounding box scene extents
  7. Add the block references created at point 3) to the Environment.Entities collection
  8. Call StartAnimation() providing the time interval between each frame
  9. Call StopAnimation() to stop the animation
Public Sub StartAnimation()
This language is not supported or no code example is available.
public void StartAnimation()
This language is not supported or no code example is available.
Remarks
 
During animation the silhouettes, if enabled, are skipped.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition