/*
 * BasicTutorial7.h
 *
 *  Created on: Feb 9, 2011
 *      Author: cpresser
 */

#ifndef BASICTUTORIAL7_H_
#define BASICTUTORIAL7_H_

#include "BaseApplication.h"
#include "GameObject.h"
#include <CEGUI/CEGUI.h>
#include <CEGUI/RendererModules/Ogre/Renderer.h>


class BasicTutorial7 : public BaseApplication
{
public:
        static const int ANGLE_CHANGE = 45;

    BasicTutorial7(void);
    virtual ~BasicTutorial7(void);

protected:
    CEGUI::OgreRenderer* mRenderer;

    virtual void createScene(void);

    virtual void createFrameListener(void);

    // Ogre::FrameListener
    virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);

    // OIS::KeyListener
    virtual bool keyPressed( const OIS::KeyEvent &arg );
    virtual bool keyReleased( const OIS::KeyEvent &arg );
    // OIS::MouseListener
    virtual bool mouseMoved( const OIS::MouseEvent &arg );
    virtual bool mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id );
    virtual bool mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id );

    bool quit(const CEGUI::EventArgs &e);
    bool openMesh(const CEGUI::EventArgs &e);
    bool selectItem(const CEGUI::EventArgs &e);
    bool mouseEnters(const CEGUI::EventArgs &e);
    bool mouseLeaves(const CEGUI::EventArgs &e);

private:
    GameObject m_obj;
    int m_objNum;
    Ogre::AnimationState *m_animState;
    bool m_overEdit;
    Ogre::Degree m_pitch, m_yaw, m_roll;
};

#endif /* BASICTUTORIAL7_H_ */