Hi,
I'm working with morphing, and I need to add a property of intensity.
I thought it as follows:
Code:
osgAnimation::FloatLinearChannel* channel0 = new
osgAnimation::FloatLinearChannel;
channel0->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::FloatKeyframe(0,0.0));
channel0->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::FloatKeyframe(0.5,intensity));
//intensity 0-1
channel0->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::FloatKeyframe(1.0,0.0));
channel0->setTargetName("");
channel0->setName("0");
animList[num].get()->getChannels().clear();
animList[num].get()->addChannel(channel0);
animList[num].get()->computeDuration();
But if I change the channel to animation in this way, the animation stops
working.
Any other way to do this?
Thank you!
Cheers,
Aitor
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39694#39694
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org