namespace graphics {
-Camera::Camera(int width, int height, const Vector<int> *target)
+Camera::Camera(int width, int height, const Vector<float> *target)
: target(target), halfWidth(width / 2), halfHeight(height / 2) {
assert(target && "construct camera without target");
}
-void Camera::SetTarget(const Vector<int> *t) {
+void Camera::SetTarget(const Vector<float> *t) {
assert(t && "cannot change camera target to 0");
target = t;
}
class Camera {
public:
- Camera(int width, int height, const geometry::Vector<int> *target);
+ Camera(int width, int height, const geometry::Vector<float> *target);
~Camera() { }
public:
void Resize(int w, int h) { halfWidth = w / 2; halfHeight = h / 2; }
- void SetTarget(const geometry::Vector<int> *t);
+ void SetTarget(const geometry::Vector<float> *t);
geometry::Vector<int> CalculateOffset() const;
private:
- const geometry::Vector<int> *target;
+ const geometry::Vector<float> *target;
int halfWidth;
int halfHeight;