Added a ton of stuff, including the beginnings of a new UI system
[ne.git] / src / phys / camera.h
blob46782d74a9eb36792964b21874b5858ac577f9e1
1 /************************************************************************
2 This file is part of NE.
4 NE is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 NE is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with NE. If not, see <http://www.gnu.org/licenses/>.
16 ************************************************************************/
18 #ifndef CAMERA_H_
19 #define CAMERA_H_
21 class Object;
23 class Camera
25 public:
27 Camera();
28 virtual ~Camera();
30 void update();
31 void apply();
33 void follow(Object *o, float dist=0) { m_object = o; m_dist = dist; }
34 void setFollowDistance(float dist) { m_dist = dist; }
36 void setUp(float x, float y, float z);
37 void setSpeed(float speed) { m_speed = speed; }
38 void setPosition(float x, float y, float z);
39 void setTarget(float x, float y, float z);
41 private:
42 Object *m_object;
43 float m_dist;
44 float m_speed;
45 float m_up[3];
46 float m_pos[3], m_cpos[3];
47 float m_target[3], m_ctarget[3];
50 #endif /*CAMERA_H_*/