X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2FCamera.cc;h=06261a1b41ba811b75a7746da669d6e5f6768531;hp=376e2c5a4ff5398ea9f1c388f23ce4cc0bbd5000;hb=8ad81a8282ce6e9e488a453e6bcd05fbc09715dc;hpb=50c1239917f5e443b8ec91773c85ceb3db7da67b diff --git a/src/Moof/Camera.cc b/src/Moof/Camera.cc index 376e2c5..06261a1 100644 --- a/src/Moof/Camera.cc +++ b/src/Moof/Camera.cc @@ -26,9 +26,8 @@ *******************************************************************************/ -#include -#include -#include +#include "Camera.hh" +#include "OpenGL.hh" namespace Mf { @@ -52,11 +51,11 @@ void Camera::setProjection(const Matrix4& projection) projection_ = projection; } -void Camera::setProjection(Scalar fovy, Scalar aspect, Scalar near, Scalar far) +void Camera::setProjection(Scalar fovy, Scalar aspect, Scalar abutting, + Scalar distant) { - cml::matrix_perspective_yfov_RH(projection_, fovy, aspect, near, far, - cml::z_clip_neg_one); - + cml::matrix_perspective_yfov_RH(projection_, fovy, aspect, abutting, + distant, cml::z_clip_neg_one); calculateSecondary(); } @@ -80,7 +79,8 @@ void Camera::update(Scalar t, Scalar dt) void Camera::lookAt(const Vector3& point) { - cml::quaternion_rotation_aim_at(rotation_, position_, point, Vector3(0.0, -1.0, 0.0)); + cml::quaternion_rotation_aim_at(rotation_, position_, point, + Vector3(0.0, -1.0, 0.0)); calculateSecondary(); }