Add Up and Right vectors to the camera

This commit is contained in:
Eryn Wells 2014-07-16 23:25:54 -07:00
parent 8336753bcf
commit 8eb98270af

View file

@ -14,7 +14,9 @@
Camera::Camera() Camera::Camera()
: height(Vector3::Y), : height(Vector3::Y),
width(4.0 / 3.0 * Vector3::X), width(4.0 / 3.0 * Vector3::X),
direction(Vector3::Z) direction(Vector3::Z),
mRight(1.33, 0, 0),
mUp(Vector3::Y)
{ } { }
@ -77,16 +79,33 @@ Camera::set_direction(const Vector3 &d)
} }
/* const Vector3&
* Camera::get_angle -- Camera::GetRight()
*
* Get the angle of view.
*/
float
Camera::get_angle()
const const
{ {
return angle; return mRight;
}
void
Camera::SetRight(const Vector3& right)
{
mRight = right;
}
const Vector3&
Camera::GetUp()
const
{
return mUp;
}
void
Camera::SetUp(const Vector3& up)
{
mUp = up;
} }
#pragma mark - Orthographic Camera #pragma mark - Orthographic Camera