Changeset 10697

Show
Ignore:
Timestamp:
10/28/09 14:31:24 (4 years ago)
Author:
robert
Message:

From Cedric Pinson, updates to osganimation example to keep in sync with changes with osgAnimation, and introduction of a hardware skinning example

Location:
OpenSceneGraph/trunk/examples
Files:
3 added
3 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/CMakeLists.txt

    r10617 r10697  
    116116    ADD_SUBDIRECTORY(osgvolume) 
    117117    ADD_SUBDIRECTORY(osgwindows) 
     118    ADD_SUBDIRECTORY(osganimationhardware) 
    118119    ADD_SUBDIRECTORY(osganimationtimeline) 
    119120    ADD_SUBDIRECTORY(osganimationnode) 
  • OpenSceneGraph/trunk/examples/osganimationskinning/osganimationskinning.cpp

    r9737 r10697  
    11/*  -*-c++-*-  
    2  *  Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net> 
     2 *  Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 
    33 * 
    44 * This library is open source and may be redistributed and/or modified under   
     
    2525#include <osgAnimation/Skeleton> 
    2626#include <osgAnimation/RigGeometry> 
    27 #include <osgAnimation/Skinning> 
    2827#include <osgAnimation/BasicAnimationManager> 
    2928 
  • OpenSceneGraph/trunk/examples/osganimationtimeline/osganimationtimeline.cpp

    r10625 r10697  
    2727#include <osgAnimation/Skeleton> 
    2828#include <osgAnimation/RigGeometry> 
    29 #include <osgAnimation/Skinning> 
    3029#include <osgAnimation/Timeline> 
    3130#include <osgAnimation/AnimationManagerBase> 
    3231#include <osgAnimation/TimelineAnimationManager> 
    3332 
     33#include <osgAnimation/ActionStripAnimation> 
     34#include <osgAnimation/ActionBlendIn> 
     35#include <osgAnimation/ActionBlendOut> 
     36#include <osgAnimation/ActionAnimation> 
     37 
    3438 
    3539struct NoseBegin : public osgAnimation::Action::Callback 
     
    5357struct ExampleTimelineUsage : public osgGA::GUIEventHandler 
    5458{ 
    55     osg::ref_ptr<osgAnimation::StripAnimation> _mainLoop; 
    56     osg::ref_ptr<osgAnimation::StripAnimation> _scratchHead; 
    57     osg::ref_ptr<osgAnimation::StripAnimation> _scratchNose; 
     59    osg::ref_ptr<osgAnimation::ActionStripAnimation> _mainLoop; 
     60    osg::ref_ptr<osgAnimation::ActionStripAnimation> _scratchHead; 
     61    osg::ref_ptr<osgAnimation::ActionStripAnimation> _scratchNose; 
    5862    osg::ref_ptr<osgAnimation::TimelineAnimationManager> _manager; 
    5963 
     
    7074            map[(*it)->getName()] = *it; 
    7175 
    72         _mainLoop = new osgAnimation::StripAnimation(map["Idle_Main"].get(),0.0,0.0); 
     76        _mainLoop = new osgAnimation::ActionStripAnimation(map["Idle_Main"].get(),0.0,0.0); 
    7377        _mainLoop->setLoop(0); // means forever 
    7478 
    75         _scratchHead = new osgAnimation::StripAnimation(map["Idle_Head_Scratch.02"].get(),0.2,0.3); 
     79        _scratchHead = new osgAnimation::ActionStripAnimation(map["Idle_Head_Scratch.02"].get(),0.2,0.3); 
    7680        _scratchHead->setLoop(1); // one time 
    7781 
    7882        map["Idle_Nose_Scratch.01"]->setDuration(10.0); // set this animation duration to 10 seconds 
    79         _scratchNose = new osgAnimation::StripAnimation(map["Idle_Nose_Scratch.01"].get(),0.2,0.3); 
     83        _scratchNose = new osgAnimation::ActionStripAnimation(map["Idle_Nose_Scratch.01"].get(),0.2,0.3); 
    8084        _scratchNose->setLoop(1); // one time 
    8185