PCL Reference Manual > Results Postprocessing Functions > Animation Functions
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Animation Functions
The following functions are used for animation.
 
res_display_tool_anim_scale
(method, plot_type, plot_name, init_angle)
Description:
 
 
This function specifies a sinusoid or linear ramp variation to be used in a subsequent animation sequence for a tool posted in the current viewport.
Input:
 
 
STRING
method[]
This value specifies the method of animation: either “modal”, or “ramp”.
STRING
plot_type[]
This value specifies the type of plot tool. See the remarks below for more information.
STRING
plot_name[]
This value specifies the name of the plot tool: either ““ or an existing posted tool name.
REAL
init_angle
This value specifies the angle in radians to start the animation. This value is used mostly for modal animations where you might want to start animation, say 90 degrees out of phase.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The COSINE function will be used for the modal data scale factor.
A linear ramp from 1 to 0 will be used for a ramped animation.
The input value plot_type can be set to the following values:
 
 
“Fringe”
“2DContour”
“Vector”
 
“Tensor”
“Icon”
“3DContour”
 
“Deformation”
“Element”
“Cursor”
 
“Isosurface”
“Stream”
 
 
Example:
None.
 
res_display_tool_anim_index
(plot_type, plot_name, start_index, end_index)
Description:
 
 
This function specifies a register list index is to be used in a subsequent animation sequence for a plot tool posted in the current viewport.
Input:
 
 
STRING
plot_type[]
This value specifies the type of plot tool. See the remarks below for more information.
STRING
plot_name[]
This value specifies the name of the plot tool: either ““ or an existing posted tool name.
INTEGER
start_index
This value specifies any number between 1 and N-1, where N is the number of data sets specified in the register list as explained below.
INTEGER
end_index
This value specifies any number between start_index+1 and N.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The indices for this function are 1 through N, corresponding to the N data sets specified by the defined register list.
This tool must be currently associated to a register containing a register list defined using the res_data_dbres_list() or res_data_register_list() functions.
The input value plot_type can be set to the following values:
 
“Fringe”
“2DContour”
“Vector”
 
“Tensor”
“Icon”
“3DContour”
 
“Deformation”
“Element”
“Cursor”
 
“Isosurface”
“Stream”
 
Example:
None.
 
res_display_tool_anim_gv
(plot_type, plot_name, global_name, init_value, end_value)
Description:
 
 
This function specifies a subsequent animation to be created using the specified global variable.
Input:
 
 
STRING
plot_type[]
This value specifies the type of plot tool. See the remarks below for more information.
STRING
plot_name[]
This value specifies the name of the plot tool: either ““ or an existing posted tool name.
STRING
global_name[]
This value specifies the global variable name.
REAL
init_value
This value specifies the starting global variable value.
REAL
end_value
This value specifies the ending global variable value.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The global variable specified by the input value global_name must be associated with the data sets in the register list of the plot tool.
The values in the tool’s register list correspond to the data set global variable values to be traversed during the animation.
The input value plot_type can be set to the following values:
 
 
“Fringe”
“2DContour”
“Vector”
 
“Tensor”
“Icon”
“3DContour”
 
“Deformation”
“Element”
“Cursor”
 
“Isosurface”
“Stream”
 
 
Example:
None.
 
res_display_tool_anim_off
(plot_type, plot_name)
Description:
 
 
This function turns off the animation of a particular plot tool.
Input:
 
 
STRING
plot_type[]
This value specifies the type of plot tool. See the remarks below for more information.
STRING
plot_name[]
This value specifies the name of the plot tool: either ““ or an existing posted tool name.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The input value plot_type can be set to the following values:
 
 
“Fringe”
“2DContour”
“Vector”
 
“Tensor”
“Icon”
“3DContour”
 
“Deformation”
“Element”
“Cursor”
 
“Isosurface”
“Stream”
 
Example:
None.
 
res_display_tool_anim_get
(plot_type, plot_name, method, start_index, end_index, global_name, init_value, end_value)
Description:
 
 
This function retrieves animation definitions for a particular plot tool.
Input:
 
 
STRING
plot_type[]
This value specifies the type of plot tool. See the remarks below for more information.
STRING
plot_name[]
This value specifies the name of the plot tool: either ““or an existing posted tool name.
Output:
 
 
STRING
method[]
This value returns the animation method for the current animation.
INTEGER
start_index
This value returns the starting index for the current animation.
INTEGER
end_index
This value returns the ending index for the current animation.
STRING
global_name[]
This value returns the global variable associated with the current animation.
REAL
init_value
This value returns the initial value of the global variable for this animation.
REAL
end_value
This value returns the ending value of the global variable associated with this animation.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The input value plot_type can be set to the following values:
 
“Fringe”
“2DContour”
“Vector”
 
“Tensor”
“Icon”
“3DContour”
 
“Deformation”
“Element”
“Cursor”
 
“Isosurface”
“Stream”
 
Example:
None.
 
res_display_anim_setup_2d
(number_frames, interp_method, file_name)
Description:
 
 
This function specifies the number of frames and interpolation method to be used for creating a 2D image animation.
Input:
 
 
INTEGER
number_frames
This value specifies the number of animation frames to create.
STRING
interp_method[]
This value specifies the method of interpolation for transient animation to create frames when actual existing data does not exist for that frame. Valid values are: “Linear”, “Spline”, “Closest”, and “None”.
STRING
file_name[]
This value specifies the root file name for animation files to be created in conjunction with the animation process. The animation files will not be created if this value is set to an empty string or ““.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The interpolation factor is used for any tool animating from a register list.
Example:
Please see res_display_anim_setup_2d.
 
res_display_anim_setup_3d
(number_frames, interp_method)
Description:
 
 
This function specifies the number of frames and interpolation method to be used for creating a 3D display list animation.
Input:
 
 
INTEGER
number_frames
This value specifies the number of animation frames to create.
STRING
interp_method[]
This value specifies the method of interpolation for transient animation to create frames when actual existing data does not exist for that frame. Valid values are: “Linear”, “Spline”, “Closest”, and “None”.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
The interpolation factor is used for any tool animating from a register list.
Example:
Please see res_display_anim_setup_3d.
 
res_display_anim_image_create
(file_name)
 
Description:
 
 
This function creates an image file of the current viewport.
Input:
 
 
STRING
file_name[]
This value specifies the file name to which the image will be dumped.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
Please see res_display_anim_image_create.
 
res_display_anim_setup_image
(number_frames, file_name)
Description:
 
 
This function specifies the files containing images to be read in and used as animation frames.
Input:
 
 
INTEGER
n_frames
This value specifies the number of animation frames to create.
STRING
file_name[](n_frames)
This value specifies the names of the files containing image information.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
 
Remarks:
None.
Example:
Please see res_display_anim_setup_image.
 
res_display_anim_bounds
(current_frame, start_frame, end_frame)
Description:
 
 
This function modifies the bounds of the frames used by a running animation.
Input:
 
 
INTEGER
current_frame
This value specifies the frame to display upon execution.
INTEGER
start_frame
This value specifies the lower bound of the frames to display.
INTEGER
end_frame
This value specifies the upper bound of the frames to display.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
Please see res_display_anim_bounds.
 
res_display_anim_method
(method)
Description:
 
 
This function modifies the method of paging from frame to frame during an animation.
Input:
 
 
STRING
method[]
This value specifies the animation method. Valid values are: “Cycle” (1->n,1->n) and “Bounce” (1<->n).
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
Please see res_display_anim_method.
 
res_display_anim_run
(delay)
 
Description:
 
 
This function starts the running of an animation at a specific frame rate and can also be used to modify the frame rate of a running animation process.
Input:
 
 
INTEGER
delay
This value specifies the delay in milliseconds between frame display calls. Setting this value to 0 will produce the maximum frame refresh rate.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
 
Remarks:
None.
Example:
Please see res_display_anim_run.
 
res_display_anim_step
()
Description:
 
 
This function stops any running animation and displays the next frame in the queue.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
This function can be used to stop animation sequences started with a call to the res_dipslay_anim_run() function.
Example:
Please see res_display_anim_step.
 
res_display_anim_frame
(frame_number)
Description:
 
 
This function displays an animation frame and stops any running animation.
Input:
 
 
INTEGER
frame_number
This value specifies the frame number of the animation to display.
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
Please see res_display_anim_frame.
 
res_display_anim_clear
()
Description:
 
 
This function stops any running animation and clears any stored animation frames from memory.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
 
Example:
Please see res_display_anim_clear.
 
res_display_anim_active
()
Description:
 
 
This function queries whether an animation is active or not.
Input:
 
 
None.
 
 
Output:
 
 
LOGICAL
<Return Value>
This function returns TRUE if an animation is active, and FALSE otherwise.
Error Conditions:
 
None.
Remarks:
None.
Example:
Please see res_display_anim_active.
 
res_display_anim_status
(current_frame, start_frame, end_frame, number_frame, delay disp_method, anim_status)
Description:
 
 
This function returns the status of an animation in the current viewport.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
current_frame
This value returns the current frame displayed in the current animation.
INTEGER
start_frame
This value returns the starting frame number of the current animation.
INTEGER
end_frame
This value returns the ending frame number of the current animation.
INTEGER
number_frame
This value returns the number of frames in the current animation.
INTEGER
delay
This value returns the delay (in milliseconds) of the current animation.
INTEGER
disp_method
This value returns the display method of the current animation.
INTEGER
anim_status
This value returns the status of the current animation.
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
This function only works if an animation is currently in progress.
Example:
None.
 
res_display_cleanup
()
Description:
 
 
This function cleans up the graphical display and returns the graphics to a wireframe state.
Input:
 
 
None.
 
 
Output:
 
 
INTEGER
<Return Value>
This function returns a value of 0 when executed successfully and a non zero value to indicate a change in status or an error.
Error Conditions:
 
See the Status Messages for information on any error values returned by this function.
Remarks:
None.
Example:
Please see res_display_cleanup.