source: trunk/src/camera.h @ 1307

Last change on this file since 1307 was 1307, checked in by sam, 8 years ago

core: move the Camera class from Orbital to the engine core.

  • Property svn:keywords set to Id
File size: 994 bytes
Line 
1//
2// Lol Engine
3//
4// Copyright: (c) 2010-2011 Sam Hocevar <sam@hocevar.net>
5//   This program is free software; you can redistribute it and/or
6//   modify it under the terms of the Do What The Fuck You Want To
7//   Public License, Version 2, as published by Sam Hocevar. See
8//   http://sam.zoy.org/projects/COPYING.WTFPL for more details.
9//
10
11//
12// The Camera class
13// ----------------
14//
15
16#if !defined __CAMERA_H__
17#define __CAMERA_H__
18
19#include "worldentity.h"
20
21namespace lol
22{
23
24class Camera : public WorldEntity
25{
26public:
27    Camera(vec3 const &position, vec3 const &target, vec3 const &up);
28    ~Camera();
29
30    char const *GetName() { return "<camera>"; }
31
32    void SetPosition(vec3 const &pos);
33
34    mat4 const &GetViewMatrix();
35    mat4 const &GetProjMatrix();
36
37protected:
38    virtual void TickGame(float deltams);
39    virtual void TickDraw(float deltams);
40
41private:
42    mat4 m_view_matrix, m_proj_matrix;
43    vec3 m_target, m_up;
44};
45
46} /* namespace lol */
47
48#endif /* __CAMERA_H__ */
49
Note: See TracBrowser for help on using the repository browser.