cee::ug::CuttingPlaneAnimation Class Reference

Use this class to generate a cutting plane animation. More...

Public Member Functions

 CuttingPlaneAnimation (UnstructGridModel *model, size_t cuttingPlaneIndex)
 Creates the cutting plane animation generator class. More...
 
void setFrameCount (size_t frameCount)
 Sets the number of animation frames to produce. More...
 
void setPerFrameDistance (double distance)
 Sets the distance the cutting plane will be moved in each frame. More...
 
void generateAnimation ()
 Generates the cutting plane animation. More...
 

Detailed Description

Use this class to generate a cutting plane animation.

The cutting plane animation will create an animation with the given number of frames where the cutting plane is moved the given distance in the direction of the cutting plane normal.

Example:

cee::ug::CuttingPlaneAnimation cpAnim(myUgModel, 0);
cpAnim.setPerFrameDistance(0.5);
cpAnim.generateAnimation();

This example will produce 30 frames (default) with the first (index 0) cutting plane being animated 0.5 in the normal direction for each frame.

To run the animation, use the same technique as for all other animations in CDC. This is described in the 'Running the animation' section of the Using Animation page.

Note
This animation will be removed if you do any updateVisualization() calls to the model. If you need to change anything, do the change, updateVisualization and then recreate the animation.

Constructor & Destructor Documentation

cee::ug::CuttingPlaneAnimation::CuttingPlaneAnimation ( UnstructGridModel model,
size_t  cuttingPlaneIndex 
)

Creates the cutting plane animation generator class.

Specifies the model and the index of the cutting plane. The model cannot be NULL and the cutting plane index must be a valid cutting plane index within the specified model.

Member Function Documentation

void cee::ug::CuttingPlaneAnimation::generateAnimation ( )

Generates the cutting plane animation.

This method will create the specified number of frames and position the cutting plane according to the distance parameter in each frame.

Note
This animation will be removed if you do any updateVisualization() calls to the model. If you need to change anything, do the change, call updateVisualization() and then recreate the animation with this method.
void cee::ug::CuttingPlaneAnimation::setFrameCount ( size_t  frameCount)

Sets the number of animation frames to produce.

Default is 30 frames.

void cee::ug::CuttingPlaneAnimation::setPerFrameDistance ( double  distance)

Sets the distance the cutting plane will be moved in each frame.

Default is 1/30 of the extent of the bounding box.