Changeset 9951
- Timestamp:
- 03/23/09 17:07:43 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osganimationmorph/osganimationmorph.cpp
r9928 r9951 63 63 osgViewer::Viewer viewer(arguments); 64 64 65 66 65 osgAnimation::Animation* animation = new osgAnimation::Animation; 67 66 osgAnimation::FloatLinearChannel* channel0 = new osgAnimation::FloatLinearChannel; … … 71 70 channel0->setName("0"); 72 71 73 osgAnimation::FloatLinearChannel* channel1 = new osgAnimation::FloatLinearChannel;74 channel1->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::FloatKeyframe(0,1.0));75 channel1->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::FloatKeyframe(1,0.0));76 channel1->setTargetName("MorphNodeCallback");77 channel1->setName("1");78 79 72 animation->addChannel(channel0); 80 animation->addChannel(channel1);81 73 animation->setName("Morph"); 82 74 animation->computeDuration(); … … 99 91 // initialize with the first shape 100 92 osgAnimation::MorphGeometry* morph = new osgAnimation::MorphGeometry(*geom0); 101 morph->addMorphTarget(geom0);102 93 morph->addMorphTarget(geom1); 103 94
