Hi, The channel are linked to target with name. To check the name that works you can read the files: src/osgAnimation/StackedRotateAxisElement.cpp src/osgAnimation/StackedTranslateElement.cpp src/osgAnimation/StackedScaleElement.cpp src/osgAnimation/StackedQuaternionElement.cpp src/osgAnimation/StackedMatrixElement.cpp The logic to understand the link operation for those elements are located in src/osgAnimation/StackedMatrixElement.cpp:
bool UpdateMatrixTransform::link(osgAnimation::Channel* channel) { const std::string& channelName = channel->getName(); // check if we can link a StackedTransformElement to the current Channel for (StackedTransform::iterator it = _transforms.begin(); it != _transforms.end(); ++it) { StackedTransformElement* element = it->get(); if (element && !element->getName().empty() && channelName == element->getName()) { Target* target = element->getOrCreateTarget(); if (target && channel->setTarget(target)) return true; } } OSG_INFO << "UpdateMatrixTransform::link Channel " << channel->getName() << " does not contain a symbolic name that can be linked to a StackedTransformElement." << std::endl; return false; } For the Material animation you will have to look to src/osgAnimation/UpdateMaterial.cpp The euler you are talking are not in the trunk anymore, it means that osganimationsolid, has not been updated and should use something like rotateaxis. I hope this little explanation will help you. Cheers, Cedric -- Provide OpenGL, WebGL and OpenSceneGraph services +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Thu, 2010-07-08 at 11:53 +0200, Raymond de Vries wrote: > Hi Gianni, > > As far as I can see the euler animation is not working at all: no > rotation. The euler animation is not 'routed', so to say. There are no > 'pre-defined' words or so, the words have to match for correct routing > (like the 'position'). > > regards > Raymond > > > > On 7/7/2010 6:31 PM, Gianni Ambrosio wrote: > > Hi All, > > I tried to look at the osganimationsolid example but I'm not sure to > > understand it correctly. Is seems to me that the way a channel is conected > > to an animation is string diven. > > > > Example (from osganimationsolid): > > > > osgAnimation::Vec3LinearChannel* channelAnimation2 = new > > osgAnimation::Vec3LinearChannel; > > channelAnimation2->setTargetName("AnimatedCallback"); > > channelAnimation2->setName("euler"); > > > > channelAnimation2->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::Vec3Keyframe(0, > > osg::Vec3(0,0,0))); > > > > channelAnimation2->getOrCreateSampler()->getOrCreateKeyframeContainer()->push_back(osgAnimation::Vec3Keyframe(1.5, > > osg::Vec3(2*osg::PI,0,0))); > > osgAnimation::Animation* anim2 = new osgAnimation::Animation; > > anim2->addChannel(channelAnimation2); > > anim2->setPlaymode(osgAnimation::Animation::LOOP); > > > > So the name "euler" is the only way I see that states the channel values > > are related to a rotation. Is it correct? If so, where can I find the list > > of all strings available? > > > > Regards > > Gianni > > > > ------------------ > > Read this topic online here: > > http://forum.openscenegraph.org/viewtopic.php?p=29799#29799 > > > > > > > > > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
signature.asc
Description: This is a digitally signed message part
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org