graphicsDeploy api:
keyframe.h
Keyframing library for use in conjunction with models created with model.h. Keyed values are stored as linked lists, with a double value stored for each relevant time. The list is maintained in ascending time order. Then, the value for a particular node parameter can be determined at any arbitrary time by interpolating across the specified values.
general keyframing functions
make_keyed() and make_passive() set the animtype of a node (to KEYED or PASSIVE), which in effect turns on or off key-framing for a node. Keys can only be added to a KEYED node (though you can add keys then turn the node back to PASSIVE; the keys will not go away, but will not affect the rendering of the scene). set_time_offset() is only applicable to model nodes, and is used to create multiple instances of an animated model such that the animations occur at offset times. key_current() applies the appropriate keyframing function or functions below depending on the type and subtype of the node in question, using the current node values (so key_current(my_rotation_x_node, 0.0) would key the current x-rotation value of the node to time 0.0 using key_rotate()).
int make_keyed(struct Node *node);
int make_passive(struct Node *node);
int set_time_offset(struct Node *model, double t);
int key_current(struct Node *node, double t);
camera parameter keying
the only keyable camera parameter is the zoom on a perspective camera (recall that camera positions and orientations are set using transformation nodes)
int key_zoom(struct Node *camera_node, double zoom, double t);
light parameter keying
light colors (either all at once or per-channel) and spot angles can be keyed
int key_light_color(struct Node *light, Color color, double t);
int key_light_color_red(struct Node *light, unsigned char red, double t);
int key_light_color_green(struct Node *light, unsigned char green, double t);
int key_light_color_blue(struct Node *light, unsigned char blue, double t);
int key_spot_angle(struct Node *light, double angle, double t);
int key_penumbra_angle(struct Node *light, double angle, double t);
transformation keying
all transformation nodes except identity() nodes can be keyed. rotations and shears are done so that the same function applies to, for example, x-, y-, and z-rotation nodes
int key_translate(struct Node *node, double dx, double dy, double dz, double t);
int key_translate_x(struct Node *node, double dx, double t);
int key_translate_y(struct Node *node, double dy, double t);
int key_translate_z(struct Node *node, double dz, double t);
int key_scale(struct Node *node, double sx, double sy, double sz, double t);
int key_scale_x(struct Node *node, double sx, double t);
int key_scale_y(struct Node *node, double sy, double t);
int key_scale_z(struct Node *node, double sz, double t);
int key_rotate(struct Node *node, double angle_degrees, double t);
int key_shear(struct Node *node, double s1, double s2, double t);
attribute keying
color and opacity (per channel or all in one fell swoop), object specularity, and some mapping parameters are all keyable
int key_color(struct Node *node, Color color, double t);
int key_color_red(struct Node *node, unsigned char red, double t);
int key_color_green(struct Node *node, unsigned char green, double t);
int key_color_blue(struct Node *node, unsigned char blue, double t);
int key_opacity_uniform(struct Node *node, unsigned char opacity, double t);
int key_opacity(struct Node *node, Color opacity_channels, double t);
int key_opacity_red(struct Node *node, unsigned char red, double t);
int key_opacity_green(struct Node *node, unsigned char green, double t);
int key_opacity_blue(struct Node *node, unsigned char blue, double t);
int key_specularity(struct Node *node, double roughness, double t);
int key_map_repeat(struct Node *node, double rpt_u, double rpt_v, double t);
int key_map_offset(struct Node *node, double oft_u, double oft_v, double t);
int key_map_stagger(struct Node *node, double stagger, double t);