Hi Lev
2009/5/5 Lev <earlnucl...@gmail.com> > > Hi, > > I have using been keyboard handling code from basic keyboard handling ( http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/BasicKeyboardInput) tutorial. > > As I understand to implement further functionality, I need to modify TankInputDeviceStateType class. TankInputDeviceStateType is just an shared object between MyKeyboardEventHandler and UpdateTankPosCallback to simplify communication between this 2 object. To add further functionality: You have to modify MyKeyboardEventHandler to handle the event you want add ( for moveFwdRequest, 'w' key is handle), You have to modify TankInputDeviceStateType to store the event you want add ( for moveFwdRequest, moveFwdRequest property is used), You have to modify UpdateTankPosCallback to apply the event you want add ( for moveFwdRequest, tank is moved), > However I cannot seem to find a way to add more members to the class. i.e. trying to add moveBckRequest. Did you mean something like this : class tankInputDeviceStateType { public: tankInputDeviceStateType::tankInputDeviceStateType() : moveFwdRequest(false), moveBckRequest(false) {} bool moveFwdRequest; bool moveBckRequest; }; If it is, you simply need to study C++. HTH David Callu > > Anyone knows how to do this? > > Thanks. [Embarassed] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=11407#11407 > > > > > > _______________________________________________ > 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