Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 780 vs 781 for /trunk/Source Code/Rendering/Camera/Camera.cpp

Diff revisions: vs.
  @@ -7,7 +7,6 @@
7 7
8 8 Camera::Camera(const stringImpl& name, const CameraType& type, const vec3<F32>& eye)
9 9 : Resource(name),
10 - _isActive(false),
11 10 _isOrthoCamera(false),
12 11 _projectionDirty(true),
13 12 _viewMatrixDirty(true),
  @@ -71,8 +70,6 @@
71 70 }
72 71
73 72 void Camera::updateProjection() {
74 - assert(_isActive);
75 -
76 73 if (_projectionDirty) {
77 74 if (_isOrthoCamera) {
78 75 _projectionMatrix.ortho(_orthoRect.x,
  @@ -94,12 +91,9 @@
94 91 }
95 92
96 93 void Camera::onActivate() {
97 - _isActive = true;
98 - updateProjection();
99 94 }
100 95
101 96 void Camera::onDeactivate() {
102 - _isActive = false;
103 97 }
104 98
105 99 void Camera::setGlobalRotation(F32 yaw, F32 pitch, F32 roll) {
  @@ -213,6 +207,7 @@
213 207
214 208 _eye.set(eye);
215 209 _target.set(target);
210 +
216 211 zAxis.set(eye - target);
217 212
218 213 zAxis.normalize();
  @@ -271,7 +266,6 @@
271 266 _projectionDirty = true;
272 267
273 268 if (updateOnSet) {
274 - _isActive = true;
275 269 updateProjection();
276 270 }
277 271 }
  @@ -283,7 +277,6 @@
283 277 _projectionDirty = true;
284 278
285 279 if (updateOnSet) {
286 - _isActive = true;
287 280 updateProjection();
288 281 }
289 282 }
  @@ -318,16 +311,12 @@
318 311 }
319 312
320 313 void Camera::updateListeners() {
321 - assert(_isActive);
322 -
323 314 for (const DELEGATE_CBK_PARAM<Camera&>& listener : _listeners) {
324 315 listener(*this);
325 316 }
326 317 }
327 318
328 319 bool Camera::updateFrustum() {
329 - assert(_isActive);
330 -
331 320 if (_frustumLocked) {
332 321 return true;
333 322 }