Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 818 vs 823 for /trunk/Source Code/Rendering/Camera/Camera.cpp

Diff revisions: vs.
  @@ -38,7 +38,9 @@
38 38 MemoryManager::DELETE(_frustum);
39 39 }
40 40
41 - void Camera::fromCamera(const Camera& camera) {
41 + void Camera::fromCamera(Camera& camera) {
42 + camera.updateLookAt();
43 +
42 44 if (camera._isOrthoCamera) {
43 45 setProjection(camera._orthoRect,
44 46 camera.getZPlanes());
  @@ -81,8 +83,7 @@
81 83 Quaternion<F32> yawRot(WORLD_Y_AXIS, -yaw);
82 84
83 85 if (!IS_ZERO(roll)) {
84 - Quaternion<F32> tempOrientation(WORLD_Z_AXIS, -roll);
85 - setRotation(yawRot * pitchRot * tempOrientation);
86 + setRotation(yawRot * pitchRot * Quaternion<F32>(WORLD_Z_AXIS, -roll));
86 87 } else {
87 88 setRotation(yawRot * pitchRot);
88 89 }
  @@ -224,7 +225,7 @@
224 225 bool projMatrixUpdated = updateProjection();
225 226 bool frustumUpdated = updateFrustum();
226 227 if (viewMatrixUpdated || projMatrixUpdated || frustumUpdated) {
227 - updateListeners();
228 + onUpdate(*this);
228 229 }
229 230 }
230 231
  @@ -327,12 +328,6 @@
327 328 return true;
328 329 }
329 330
330 - void Camera::updateListeners() {
331 - for (const DELEGATE_CBK_PARAM<const Camera&>& listener : _listeners) {
332 - listener(*this);
333 - }
334 - }
335 -
336 331 bool Camera::updateFrustum() {
337 332 if (_frustumLocked) {
338 333 return true;