Bit more clean up of cameras

This commit is contained in:
Eryn Wells 2014-07-19 17:24:52 -07:00
parent b03ad0ac2d
commit b85a6aed7b
2 changed files with 15 additions and 13 deletions

View file

@ -12,33 +12,34 @@
#pragma mark - Generic Camera
Camera::Camera()
: direction(Vector3::Z),
: mDirection(Vector3::Z),
mRight(1.33, 0, 0),
mUp(Vector3::Y)
{ }
Camera::Camera(const Camera& other)
: mDirection(other.mDirection),
mRight(other.mRight),
mUp(other.mUp)
{ }
Camera::~Camera()
{ }
/*
* Camera::get_direction --
* Camera::set_direction --
*
* Get and set direction vector.
*/
const Vector3 &
const Vector3&
Camera::get_direction()
const
{
return direction;
return mDirection;
}
void
Camera::set_direction(const Vector3 &d)
Camera::set_direction(const Vector3 &direction)
{
direction = d;
mDirection = direction;
}

View file

@ -14,11 +14,12 @@
#include "object.h"
class Camera
struct Camera
: public Object
{
public:
Camera();
Camera(const Camera& other);
virtual ~Camera();
const Vector3 &get_direction() const;
@ -35,7 +36,7 @@ public:
private:
/** A normalized vector defining where the camera is pointed. */
Vector3 direction;
Vector3 mDirection;
/**
* A vector defining the width of the camera's image plane. The ratio of