2010-04-21 07:48:36 -07:00
|
|
|
#ifndef VIEW_H
|
|
|
|
#define VIEW_H
|
|
|
|
|
2019-03-07 08:12:09 -08:00
|
|
|
#include <irrlicht/irrlicht.h>
|
2010-04-21 07:48:36 -07:00
|
|
|
|
|
|
|
#include "Debug.h"
|
|
|
|
#include "Engine.h"
|
|
|
|
#include "Utils.h"
|
|
|
|
|
|
|
|
|
2019-03-07 19:18:07 -08:00
|
|
|
|
|
|
|
class View : public irr::IEventReceiver
|
2010-04-21 07:48:36 -07:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
Engine *m_Engine;
|
2019-03-07 19:18:07 -08:00
|
|
|
irr::f32 m_Yaw, m_Pitch, m_CameraDistance;
|
|
|
|
irr::core::vector2d<int> *m_LastMousePosition;
|
2010-04-21 07:48:36 -07:00
|
|
|
bool m_RotMouse;
|
|
|
|
|
|
|
|
void setNewCameraPosition();
|
2019-03-07 19:18:07 -08:00
|
|
|
void setNewLightDirection( const irr::core::vector3df &cameraPosition );
|
2010-04-21 07:48:36 -07:00
|
|
|
|
|
|
|
public:
|
|
|
|
View( Engine *engine );
|
|
|
|
~View();
|
|
|
|
|
|
|
|
// IEventReceiver
|
2019-03-07 19:18:07 -08:00
|
|
|
virtual bool OnEvent( const irr::SEvent &event );
|
2010-04-21 07:48:36 -07:00
|
|
|
};
|
|
|
|
|
2019-03-07 19:18:07 -08:00
|
|
|
#endif // VIEW_H
|