50 wiersze
994 B

  1. //
  2. // Lol Engine
  3. //
  4. // Copyright: (c) 2010-2012 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. // The Camera class
  12. // ----------------
  13. //
  14. #if !defined __CAMERA_H__
  15. #define __CAMERA_H__
  16. #include "worldentity.h"
  17. namespace lol
  18. {
  19. class Camera : public WorldEntity
  20. {
  21. public:
  22. Camera(vec3 const &position, vec3 const &target, vec3 const &up);
  23. ~Camera();
  24. char const *GetName() { return "<camera>"; }
  25. void SetPosition(vec3 const &pos);
  26. mat4 const &GetViewMatrix();
  27. mat4 const &GetProjMatrix();
  28. protected:
  29. virtual void TickGame(float seconds);
  30. virtual void TickDraw(float seconds);
  31. private:
  32. mat4 m_view_matrix, m_proj_matrix;
  33. vec3 m_target, m_up;
  34. };
  35. } /* namespace lol */
  36. #endif /* __CAMERA_H__ */