constructor
class TutorialFrameListener : public ExampleFrameListener, public OIS::MouseListener, public OIS::KeyListener
{
public:
TutorialFrameListener(RenderWindow* win, Camera* cam, SceneManager *sceneMgr)
: ExampleFrameListener(win, cam, true, true)
{
// Populate the camera and scene manager containers
mCamNode = cam->getParentSceneNode();
mSceneMgr = sceneMgr;
// set the rotation and move speed
mRotate = 0.13;
mMove = 250;
// continue rendering
mContinue = true;
mMouse->setEventCallback(this);
mKeyboard->setEventCallback(this);
}
в каком порядке вызовутся функции:
mKeyboard->setEventCallback(this);
OIS::KeyListener::KeyListener()
ExampleFrameListener(win, cam, true, true)