Time for action - creating and driving a character system

Now we are going to load and play animations for an existing OSG character: bignathan. This was created by the principal author of osgAnimation, and contains a few comic animations. The main work here is to obtain the animation manager from the root node, list all available animations, and play a certain animation within it.

  1. Include the necessary headers:
    #include <osgAnimation/BasicAnimationManager>
    #include <osgDB/ReadFile>
    #include <osgViewer/Viewer>
    #include <iostream>
    
  2. We would like to configure two arguments for the application. The argument --animation specifies a name string that will be played in the application, and --listall lists all available animations on the console:
    osg::ArgumentParser ...

Get OpenSceneGraph 3.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.