rayzor

diff src/camera.cc @ 13:964f8ea5f095

missed quite a lot of things in my last commit apparently
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 12 Apr 2014 23:37:55 +0300
parents d94a69933a71
children be616b58df99
line diff
     1.1 --- a/src/camera.cc	Sat Apr 12 23:28:24 2014 +0300
     1.2 +++ b/src/camera.cc	Sat Apr 12 23:37:55 2014 +0300
     1.3 @@ -9,12 +9,12 @@
     1.4  
     1.5  void Camera::set_target(const Vector3 &target)
     1.6  {
     1.7 -	this->target->set_position(target);
     1.8 +	this->target.set_position(target);
     1.9  }
    1.10  
    1.11 -const Vector3 &Camera::get_target() const
    1.12 +Vector3 Camera::get_target() const
    1.13  {
    1.14 -	return target->get_position();
    1.15 +	return target.get_position();
    1.16  }
    1.17  
    1.18  void Camera::set_fov(float fov)
    1.19 @@ -30,7 +30,7 @@
    1.20  void Camera::calc_matrix() const
    1.21  {
    1.22  	xform.set_identity();
    1.23 -	xform.lookat(pos, target, Vector3(0, 1, 0));
    1.24 +	xform.lookat(pos, target.get_position(), Vector3(0, 1, 0));
    1.25  	xform_valid = true;
    1.26  }
    1.27  
    1.28 @@ -43,7 +43,7 @@
    1.29  {
    1.30  }
    1.31  
    1.32 -bool Camera::intersect(const Ray &ray, float *dist)
    1.33 +bool Camera::intersect(const Ray &ray, float *dist) const
    1.34  {
    1.35  	return false;
    1.36  }