#include <sglKeyFrameAnimation.hpp>
Inheritance diagram for sglKeyFrameAnimation::
Public Methods | |
sglKeyFrameAnimation () | |
virtual | ~sglKeyFrameAnimation () |
virtual bool | addChild (sglNode *node) |
virtual bool | insertChild (unsigned int index, sglNode *node) |
virtual bool | removeChild (sglNode *node) |
virtual sglNode* | removeChild (unsigned int index) |
void | setOffsetFrame (unsigned int frame_offset) |
unsigned int | getOffsetFrame () const |
bool | setDuration (sglNode *node, unsigned int num_frames) |
unsigned int | getDuration (sglNode *node) const |
bool | setDuration (unsigned int index, unsigned int num_frames) |
unsigned int | getDuration (unsigned int index) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectf &isector) const |
virtual sglBound::IntersectResultEnum | intersect (sglIntersectd &isector) const |
virtual void | pick (sglPickf &pick_state, unsigned int cull_flags) const |
virtual void | pick (sglPickd &pick_state, unsigned int cull_flags) const |
virtual void | preDraw (const PreDrawStruct &trav_state) |
virtual sglNode* | clone (unsigned int mode) const |
virtual void | printInfo (ostream &ostrm, const char *indent_string) const |
Protected Methods | |
virtual void | cull (sglCull< float > &trav_state, unsigned int cull_flags) const |
virtual void | cull (sglCull< double > &trav_state, unsigned int cull_flags) const |
virtual void | computeValues () |
sglNode* | computeChild (int frame) const |
sglNode* | selectChild (unsigned int current_frame) const |
void | copyTo (sglKeyFrameAnimation *dst, unsigned int mode) const |
Protected Attributes | |
vector<unsigned int> | m_frame_counts |
unsigned int | m_start_frame |
unsigned int | m_pause_frame |
unsigned int | m_frame_offset |
unsigned int | m_total_frames |
unsigned int | m_total_frames2 |
unsigned int | m_forward_frames |
unsigned int | m_return_frames |
Example:
sglKeyFrameAnimation *animation = new sglKeyFrameAnimation; for (unsigned int ix=0; ix<10; ++ix) { sglGeode *geode = new sglGeode; animation->addChild(geode); animation->setDuration(ix, 10); // display for 10 frames } animation->setMode(sglAnimation::eSWING); // back and forth animation->setRange(3, 8); // display 3...8 animation->setSpeed(2.5f); // 2.5 times faster (4 fr. each) animation->setNumCycles(0); // continuous // set the animation to start on the next frame (after preDraw()). animation->setState(sglAnimation::eSTART);
Definition at line 65 of file sglKeyFrameAnimation.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
Add child to the end of the list.
Reimplemented from sglGroup. |
|
Insert a child at a specific index. Valid indices are in the range [0,getNumChildren()].
Reimplemented from sglGroup. |
|
Remove the last instance of the child from the list
Reimplemented from sglGroup. |
|
Removes child at position index (valid indices: [0,getNumChildren()-1]). Nodes after this in the list then shift down one index.
Reimplemented from sglGroup. |
|
Set a frame offset when starting the animation. Only positive offsets are allowed, which will start the animation further forward into the sequence. This will only take effect the next time the state is changed to START.
Definition at line 86 of file sglKeyFrameAnimation.hpp. |
|
Query the current frame offset.
Definition at line 92 of file sglKeyFrameAnimation.hpp. |
|
Sets the duration, in number of frames, of the first child in the list that matches the pointer.
|
|
Gets the current duration of the child specified by the node pointer.
|
|
Sets the duration, in number of frames, of the child specified by the index.
|
|
Gets the current duration of the child corresponding to the index.
|
|
The single precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The double precision intersection traversal function which returns the closest object (bounding volume and/or triangle) that intersects with the given intersect segment.
Reimplemented from sglGroup. |
|
The single precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
The double precision pick traversal function which returns all objects that fall within the pick frustum.
Reimplemented from sglGroup. |
|
This is the pre-draw traversal function which should be called before intersecting or culling the scene graph. This "cleans" the tree by computing the bound boxes and spheres that have been marked as dirty, building display lists for geometry that has changed, binding textures that need to be, updating the animation nodes whose state has changed. This should be called with a valid graphics context current.
Reimplemented from sglGroup. |
|
Make a copy of the scenegraph rooted at this node.
Reimplemented from sglGroup. |
|
Output the state of this node to the specified ostream.
Reimplemented from sglAnimation. |
|
The single precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |
|
The double precision cull traversal function that culls out subgraphs that do not lie in the view frustum (stored in the sglCull parameter). Subclasses must implement this function. The entry point for user-friendly culling is in the sglScene class.
Reimplemented from sglGroup. |