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
|
|
|
|
2019-03-09 12:42:40 -08:00
|
|
|
class Engine;
|
2019-03-07 19:18:07 -08:00
|
|
|
|
2019-04-11 01:31:04 -07:00
|
|
|
class View : public irr::IEventReceiver {
|
2010-04-21 07:48:36 -07:00
|
|
|
private:
|
2019-04-11 01:31:04 -07:00
|
|
|
Engine* m_Engine;
|
2019-04-19 12:29:30 -07:00
|
|
|
irr::f32 m_YawFromTarget, m_PitchFromTarget, m_CameraDistance;
|
2019-04-11 01:31:04 -07:00
|
|
|
irr::core::vector2d<int>* m_LastMousePosition;
|
2010-04-21 07:48:36 -07:00
|
|
|
bool m_RotMouse;
|
2019-03-10 06:55:31 -07:00
|
|
|
bool m_zUp;
|
2010-04-21 07:48:36 -07:00
|
|
|
|
|
|
|
void setNewCameraPosition();
|
2019-03-10 06:55:31 -07:00
|
|
|
void setNewCameraPosition(bool zUp);
|
2019-04-19 12:29:30 -07:00
|
|
|
void setNewLightDirection(const irr::core::vector3df& cameraPosition, const irr::core::vector3df& cameraTarget);
|
2010-04-21 07:48:36 -07:00
|
|
|
|
|
|
|
public:
|
2019-04-11 01:31:04 -07:00
|
|
|
View(Engine* engine);
|
2010-04-21 07:48:36 -07:00
|
|
|
~View();
|
2019-03-10 06:55:31 -07:00
|
|
|
void setZUp(bool zUp);
|
2019-04-19 12:29:30 -07:00
|
|
|
float cameraDistance();
|
2019-03-10 06:55:31 -07:00
|
|
|
void setCameraDistance(float cameraDistance);
|
|
|
|
bool zUp();
|
|
|
|
bool m_Shift;
|
2021-03-22 09:21:01 -07:00
|
|
|
std::string m_MouseUser;
|
2010-04-21 07:48:36 -07:00
|
|
|
|
|
|
|
// IEventReceiver
|
2019-04-11 01:31:04 -07:00
|
|
|
virtual bool OnEvent(const irr::SEvent& event);
|
2010-04-21 07:48:36 -07:00
|
|
|
};
|
|
|
|
|
2019-04-11 01:31:04 -07:00
|
|
|
#endif // VIEW_H
|