source: trunk/src/camera.h @ 2291

Last change on this file since 2291 was 2216, checked in by touky, 8 years ago

New year copyright update.

  • Property svn:keywords set to Id
File size: 1.2 KB
RevLine 
[1307]1//
2// Lol Engine
3//
[2216]4// Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net>
[1307]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
[2183]8//   http://www.wtfpl.net/ for more details.
[1307]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);
[1353]33    void SetRotation(quat const &rot);
[1350]34    void SetOrtho(float width, float height, float near, float far);
35    void SetPerspective(float fov, float width, float height,
36                        float near, float far);
[1375]37    void SetTarget(vec3 const &pos);
38    vec3 GetTarget();
[1724]39    vec3 GetPosition();
[1307]40
41    mat4 const &GetViewMatrix();
42    mat4 const &GetProjMatrix();
43
44protected:
[1310]45    virtual void TickGame(float seconds);
46    virtual void TickDraw(float seconds);
[1307]47
48private:
49    mat4 m_view_matrix, m_proj_matrix;
50    vec3 m_target, m_up;
51};
52
53} /* namespace lol */
54
55#endif /* __CAMERA_H__ */
56
Note: See TracBrowser for help on using the repository browser.