瀏覽代碼

roll back PR 746 (worldTransform to identity) in master branch

Stephen Gold 7 年之前
父節點
當前提交
e0230a4b12
共有 1 個文件被更改,包括 3 次插入15 次删除
  1. 3 15
      jme3-core/src/main/java/com/jme3/scene/Geometry.java

+ 3 - 15
jme3-core/src/main/java/com/jme3/scene/Geometry.java

@@ -137,20 +137,6 @@ public class Geometry extends Spatial {
         return super.checkCulling(cam);
     }
 
-    /**
-     * Update the world transform of this Geometry and clear the
-     * TRANSFORM refresh flag.
-     */
-    @Override
-    void checkDoTransformUpdate() {
-        if (ignoreTransform) {
-            worldTransform.loadIdentity();
-            refreshFlags &= ~RF_TRANSFORM;
-        } else {
-            super.checkDoTransformUpdate();
-        }    
-    }
-    
     /**
      * @return If ignoreTransform mode is set.
      *
@@ -165,7 +151,6 @@ public class Geometry extends Spatial {
      */
     public void setIgnoreTransform(boolean ignoreTransform) {
         this.ignoreTransform = ignoreTransform;
-        setTransformRefresh();
     }
 
     /**
@@ -413,6 +398,9 @@ public class Geometry extends Spatial {
 
         // Compute the cached world matrix
         cachedWorldMat.loadIdentity();
+        if (ignoreTransform) {
+            return;
+        }
         cachedWorldMat.setRotationQuaternion(worldTransform.getRotation());
         cachedWorldMat.setTranslation(worldTransform.getTranslation());