Animating the transformation nodes

Path animations are the most commonly-used animations in graphics applications. They can be used to describe a running car, a flight, a rotating ball, or the camera's motion. The path should always be set up first, including position, rotation, and scale values at different key time nodes. When the simulation loop is running, a transition state is calculated every frame, using the linear interpolation for position and scale vectors, and spherical linear interpolation for the rotation quaternion. The slerp() method of osg::Quat is used internally here.

OSG provides the osg::AnimationPath class to encapsulate a time varying transformation path. It has an insert() method that can be used to insert a control point ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.