1 #ifndef SPACE_CAMERA_H_
2 #define SPACE_CAMERA_H_
4 #include "../math/Vector.h"
12 Camera(int w, int h, const Vector<float> &);
15 void SetTarget(const Vector<float> &t) { target = &t; }
16 void SetZoom(float z) { zoom = z; }
18 void Resize(int w, int h);
19 void Update(float deltaT);
26 Vector<int> ToScreen(Vector<float> v) const {
27 return Vector<int>(OffsetOf(v));
29 Vector<float> OffsetOf(Vector<float> v) const {
30 return ToScale(v - *target) + offset;
32 Vector<float> ToScale(Vector<float> v) const {
37 const Vector<float> *target;