From 67ce41ee5777e901cac2a06015ec93bd132c7e7e Mon Sep 17 00:00:00 2001 From: "sha..RD" Date: Fri, 13 Sep 2013 00:48:47 +0000 Subject: [PATCH] * Make sure to reset planeState and viewportChanged values in when cloning cameras git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10771 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/renderer/Camera.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/engine/src/core/com/jme3/renderer/Camera.java b/engine/src/core/com/jme3/renderer/Camera.java index a714d7a6c..74da04671 100644 --- a/engine/src/core/com/jme3/renderer/Camera.java +++ b/engine/src/core/com/jme3/renderer/Camera.java @@ -320,33 +320,33 @@ public class Camera implements Savable, Cloneable { this.width = cam.width; this.height = cam.height; - this.planeState = cam.planeState; - this.viewportChanged = cam.viewportChanged; + this.planeState = 0; + this.viewportChanged = true; for (int i = 0; i < MAX_WORLD_PLANES; ++i) { worldPlane[i].setNormal(cam.worldPlane[i].getNormal()); worldPlane[i].setConstant(cam.worldPlane[i].getConstant()); } this.parallelProjection = cam.parallelProjection; - if(cam.projectionMatrixOverride != null) { - if(this.projectionMatrixOverride == null) { - this.projectionMatrixOverride = cam.projectionMatrixOverride.clone(); - } else { - this.projectionMatrixOverride.set(cam.projectionMatrixOverride); - } + if (cam.projectionMatrixOverride != null) { + if (this.projectionMatrixOverride == null) { + this.projectionMatrixOverride = cam.projectionMatrixOverride.clone(); + } else { + this.projectionMatrixOverride.set(cam.projectionMatrixOverride); + } } else { - this.projectionMatrixOverride = null; + this.projectionMatrixOverride = null; } this.viewMatrix.set(cam.viewMatrix); this.projectionMatrix.set(cam.projectionMatrix); this.viewProjectionMatrix.set(cam.viewProjectionMatrix); - + this.guiBounding.setXExtent(cam.guiBounding.getXExtent()); this.guiBounding.setYExtent(cam.guiBounding.getYExtent()); this.guiBounding.setZExtent(cam.guiBounding.getZExtent()); this.guiBounding.setCenter(cam.guiBounding.getCenter()); this.guiBounding.setCheckPlane(cam.guiBounding.getCheckPlane()); - + this.name = cam.name; }