Hi,

I am wondering why the init() function of the newly added matrix manipulator is not called during KeySwitchMatrixManipulator::addMatrixManipulator(int key, std::string name, MatrixManipulator *cm)
{
...
      _current->setByMatrix(getMatrix());
}

while it is called during handle(const GUIEventAdapter& ea,GUIActionAdapter& aa)
{
   if(ea.getEventType()==GUIEventAdapter::KEYDOWN){
   ...
osg::notify(osg::INFO)<<"Switching to manipulator: "<<(*it).second.first<<std::endl;
        ...
            it->second.second->setByMatrix(_current->getMatrix());
           it->second.second->init(ea,aa);
           _current = it->second.second;
}

shouldn't we initialize therefore the first added manipulator ?

--
Remy Deslignes

Ingenieur Developement / Software Engineer
Tel: +33 (0)1.53.90.11.19

===========================================
Silicon Worlds S.A.
12, rue de Chatillon
75014 Paris  France
Tel: +33 (0)1.53.90.11.11
Fax: +33 (0)1.53.90.11.12
http://www.silicon-worlds.fr
===========================================


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.7.0/345 - Release Date: 22/05/2006


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to