浏览代码

Reverting vectorsAA

David Catuhe 10 年之前
父节点
当前提交
7d94ff64f1

+ 199 - 200
dist/preview release - alpha/babylon.2.2.d.ts

@@ -2148,6 +2148,62 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class DebugLayer {
+        private _scene;
+        private _camera;
+        private _transformationMatrix;
+        private _enabled;
+        private _labelsEnabled;
+        private _displayStatistics;
+        private _displayTree;
+        private _displayLogs;
+        private _globalDiv;
+        private _statsDiv;
+        private _statsSubsetDiv;
+        private _optionsDiv;
+        private _optionsSubsetDiv;
+        private _logDiv;
+        private _logSubsetDiv;
+        private _treeDiv;
+        private _treeSubsetDiv;
+        private _drawingCanvas;
+        private _drawingContext;
+        private _syncPositions;
+        private _syncData;
+        private _syncUI;
+        private _onCanvasClick;
+        private _clickPosition;
+        private _ratio;
+        private _identityMatrix;
+        private _showUI;
+        private _needToRefreshMeshesTree;
+        shouldDisplayLabel: (node: Node) => boolean;
+        shouldDisplayAxis: (mesh: Mesh) => boolean;
+        axisRatio: number;
+        accentColor: string;
+        customStatsFunction: () => string;
+        constructor(scene: Scene);
+        private _refreshMeshesTreeContent();
+        private _renderSingleAxis(zero, unit, unitText, label, color);
+        private _renderAxis(projectedPosition, mesh, globalViewport);
+        private _renderLabel(text, projectedPosition, labelOffset, onClick, getFillStyle);
+        private _isClickInsideRect(x, y, width, height);
+        isVisible(): boolean;
+        hide(): void;
+        show(showUI?: boolean, camera?: Camera): void;
+        private _clearLabels();
+        private _generateheader(root, text);
+        private _generateTexBox(root, title, color);
+        private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
+        private _generateCheckBox(root, title, initialState, task, tag?);
+        private _generateButton(root, title, task, tag?);
+        private _generateRadio(root, title, name, initialState, task, tag?);
+        private _generateDOMelements();
+        private _displayStats();
+    }
+}
+
+declare module BABYLON {
     class BoundingBox {
         minimum: Vector3;
         maximum: Vector3;
@@ -2156,7 +2212,6 @@ declare module BABYLON {
         extendSize: Vector3;
         directions: Vector3[];
         vectorsWorld: Vector3[];
-        vectorsWorldAA: Vector3[];
         minimumWorld: Vector3;
         maximumWorld: Vector3;
         private _worldMatrix;
@@ -2228,58 +2283,43 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class DebugLayer {
+    class LensFlare {
+        size: number;
+        position: number;
+        color: Color3;
+        texture: Texture;
+        private _system;
+        constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
+        dispose: () => void;
+    }
+}
+
+declare module BABYLON {
+    class LensFlareSystem {
+        name: string;
+        lensFlares: LensFlare[];
+        borderLimit: number;
+        meshesSelectionPredicate: (mesh: Mesh) => boolean;
         private _scene;
-        private _camera;
-        private _transformationMatrix;
-        private _enabled;
-        private _labelsEnabled;
-        private _displayStatistics;
-        private _displayTree;
-        private _displayLogs;
-        private _globalDiv;
-        private _statsDiv;
-        private _statsSubsetDiv;
-        private _optionsDiv;
-        private _optionsSubsetDiv;
-        private _logDiv;
-        private _logSubsetDiv;
-        private _treeDiv;
-        private _treeSubsetDiv;
-        private _drawingCanvas;
-        private _drawingContext;
-        private _syncPositions;
-        private _syncData;
-        private _syncUI;
-        private _onCanvasClick;
-        private _clickPosition;
-        private _ratio;
-        private _identityMatrix;
-        private _showUI;
-        private _needToRefreshMeshesTree;
-        shouldDisplayLabel: (node: Node) => boolean;
-        shouldDisplayAxis: (mesh: Mesh) => boolean;
-        axisRatio: number;
-        accentColor: string;
-        customStatsFunction: () => string;
-        constructor(scene: Scene);
-        private _refreshMeshesTreeContent();
-        private _renderSingleAxis(zero, unit, unitText, label, color);
-        private _renderAxis(projectedPosition, mesh, globalViewport);
-        private _renderLabel(text, projectedPosition, labelOffset, onClick, getFillStyle);
-        private _isClickInsideRect(x, y, width, height);
-        isVisible(): boolean;
-        hide(): void;
-        show(showUI?: boolean, camera?: Camera): void;
-        private _clearLabels();
-        private _generateheader(root, text);
-        private _generateTexBox(root, title, color);
-        private _generateAdvancedCheckBox(root, leftTitle, rightTitle, initialState, task, tag?);
-        private _generateCheckBox(root, title, initialState, task, tag?);
-        private _generateButton(root, title, task, tag?);
-        private _generateRadio(root, title, name, initialState, task, tag?);
-        private _generateDOMelements();
-        private _displayStats();
+        private _emitter;
+        private _vertexDeclaration;
+        private _vertexStrideSize;
+        private _vertexBuffer;
+        private _indexBuffer;
+        private _effect;
+        private _positionX;
+        private _positionY;
+        private _isEnabled;
+        constructor(name: string, emitter: any, scene: Scene);
+        isEnabled: boolean;
+        getScene(): Scene;
+        getEmitter(): any;
+        setEmitter(newEmitter: any): void;
+        getEmitterPosition(): Vector3;
+        computeEffectivePosition(globalViewport: Viewport): boolean;
+        _isVisible(): boolean;
+        render(): boolean;
+        dispose(): void;
     }
 }
 
@@ -2388,43 +2428,34 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class LensFlare {
-        size: number;
-        position: number;
-        color: Color3;
-        texture: Texture;
-        private _system;
-        constructor(size: number, position: number, color: any, imgUrl: string, system: LensFlareSystem);
-        dispose: () => void;
+    interface ISceneLoaderPlugin {
+        extensions: string;
+        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
+        load: (scene: Scene, data: string, rootUrl: string) => boolean;
     }
-}
-
-declare module BABYLON {
-    class LensFlareSystem {
-        name: string;
-        lensFlares: LensFlare[];
-        borderLimit: number;
-        meshesSelectionPredicate: (mesh: Mesh) => boolean;
-        private _scene;
-        private _emitter;
-        private _vertexDeclaration;
-        private _vertexStrideSize;
-        private _vertexBuffer;
-        private _indexBuffer;
-        private _effect;
-        private _positionX;
-        private _positionY;
-        private _isEnabled;
-        constructor(name: string, emitter: any, scene: Scene);
-        isEnabled: boolean;
-        getScene(): Scene;
-        getEmitter(): any;
-        setEmitter(newEmitter: any): void;
-        getEmitterPosition(): Vector3;
-        computeEffectivePosition(globalViewport: Viewport): boolean;
-        _isVisible(): boolean;
-        render(): boolean;
-        dispose(): void;
+    class SceneLoader {
+        private static _ForceFullSceneLoadingForIncremental;
+        private static _ShowLoadingScreen;
+        static ForceFullSceneLoadingForIncremental: boolean;
+        static ShowLoadingScreen: boolean;
+        private static _registeredPlugins;
+        private static _getPluginForFilename(sceneFilename);
+        static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
+        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
+        /**
+        * Load a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param engine is the instance of BABYLON.Engine to use to create the scene
+        */
+        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
+        /**
+        * Append a scene
+        * @param rootUrl a string that defines the root url for scene and resources
+        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
+        * @param scene is the instance of BABYLON.Scene to append to
+        */
+        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
     }
 }
 
@@ -2656,38 +2687,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    interface ISceneLoaderPlugin {
-        extensions: string;
-        importMesh: (meshesNames: any, scene: Scene, data: any, rootUrl: string, meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => boolean;
-        load: (scene: Scene, data: string, rootUrl: string) => boolean;
-    }
-    class SceneLoader {
-        private static _ForceFullSceneLoadingForIncremental;
-        private static _ShowLoadingScreen;
-        static ForceFullSceneLoadingForIncremental: boolean;
-        static ShowLoadingScreen: boolean;
-        private static _registeredPlugins;
-        private static _getPluginForFilename(sceneFilename);
-        static RegisterPlugin(plugin: ISceneLoaderPlugin): void;
-        static ImportMesh(meshesNames: any, rootUrl: string, sceneFilename: string, scene: Scene, onsuccess?: (meshes: AbstractMesh[], particleSystems: ParticleSystem[], skeletons: Skeleton[]) => void, progressCallBack?: () => void, onerror?: (scene: Scene, e: any) => void): void;
-        /**
-        * Load a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param engine is the instance of BABYLON.Engine to use to create the scene
-        */
-        static Load(rootUrl: string, sceneFilename: any, engine: Engine, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-        /**
-        * Append a scene
-        * @param rootUrl a string that defines the root url for scene and resources
-        * @param sceneFilename a string that defines the name of the scene file. can start with "data:" following by the stringified version of the scene
-        * @param scene is the instance of BABYLON.Scene to append to
-        */
-        static Append(rootUrl: string, sceneFilename: any, scene: Scene, onsuccess?: (scene: Scene) => void, progressCallBack?: any, onerror?: (scene: Scene) => void): void;
-    }
-}
-
-declare module BABYLON {
     class Color3 {
         r: number;
         g: number;
@@ -4268,83 +4267,6 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
-    class BoundingBoxRenderer {
-        frontColor: Color3;
-        backColor: Color3;
-        showBackLines: boolean;
-        renderList: SmartArray<BoundingBox>;
-        private _scene;
-        private _colorShader;
-        private _vb;
-        private _ib;
-        constructor(scene: Scene);
-        private _prepareRessources();
-        reset(): void;
-        render(): void;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
-    class DepthRenderer {
-        private _scene;
-        private _depthMap;
-        private _effect;
-        private _viewMatrix;
-        private _projectionMatrix;
-        private _transformMatrix;
-        private _worldViewProjection;
-        private _cachedDefines;
-        constructor(scene: Scene, type?: number);
-        isReady(subMesh: SubMesh, useInstances: boolean): boolean;
-        getDepthMap(): RenderTargetTexture;
-        dispose(): void;
-    }
-}
-
-declare module BABYLON {
-    class OutlineRenderer {
-        private _scene;
-        private _effect;
-        private _cachedDefines;
-        constructor(scene: Scene);
-        render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
-        isReady(subMesh: SubMesh, useInstances: boolean): boolean;
-    }
-}
-
-declare module BABYLON {
-    class RenderingGroup {
-        index: number;
-        private _scene;
-        private _opaqueSubMeshes;
-        private _transparentSubMeshes;
-        private _alphaTestSubMeshes;
-        private _activeVertices;
-        constructor(index: number, scene: Scene);
-        render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void): boolean;
-        prepare(): void;
-        dispatch(subMesh: SubMesh): void;
-    }
-}
-
-declare module BABYLON {
-    class RenderingManager {
-        static MAX_RENDERINGGROUPS: number;
-        private _scene;
-        private _renderingGroups;
-        private _depthBufferAlreadyCleaned;
-        constructor(scene: Scene);
-        private _renderParticles(index, activeMeshes);
-        private _renderSprites(index);
-        private _clearDepthBuffer();
-        render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
-        reset(): void;
-        dispatch(subMesh: SubMesh): void;
-    }
-}
-
-declare module BABYLON {
     class AnaglyphPostProcess extends PostProcess {
         constructor(name: string, ratio: number, camera: Camera, samplingMode?: number, engine?: Engine, reusable?: boolean);
     }
@@ -4884,6 +4806,83 @@ declare module BABYLON {
 }
 
 declare module BABYLON {
+    class BoundingBoxRenderer {
+        frontColor: Color3;
+        backColor: Color3;
+        showBackLines: boolean;
+        renderList: SmartArray<BoundingBox>;
+        private _scene;
+        private _colorShader;
+        private _vb;
+        private _ib;
+        constructor(scene: Scene);
+        private _prepareRessources();
+        reset(): void;
+        render(): void;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
+    class DepthRenderer {
+        private _scene;
+        private _depthMap;
+        private _effect;
+        private _viewMatrix;
+        private _projectionMatrix;
+        private _transformMatrix;
+        private _worldViewProjection;
+        private _cachedDefines;
+        constructor(scene: Scene, type?: number);
+        isReady(subMesh: SubMesh, useInstances: boolean): boolean;
+        getDepthMap(): RenderTargetTexture;
+        dispose(): void;
+    }
+}
+
+declare module BABYLON {
+    class OutlineRenderer {
+        private _scene;
+        private _effect;
+        private _cachedDefines;
+        constructor(scene: Scene);
+        render(subMesh: SubMesh, batch: _InstancesBatch, useOverlay?: boolean): void;
+        isReady(subMesh: SubMesh, useInstances: boolean): boolean;
+    }
+}
+
+declare module BABYLON {
+    class RenderingGroup {
+        index: number;
+        private _scene;
+        private _opaqueSubMeshes;
+        private _transparentSubMeshes;
+        private _alphaTestSubMeshes;
+        private _activeVertices;
+        constructor(index: number, scene: Scene);
+        render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void): boolean;
+        prepare(): void;
+        dispatch(subMesh: SubMesh): void;
+    }
+}
+
+declare module BABYLON {
+    class RenderingManager {
+        static MAX_RENDERINGGROUPS: number;
+        private _scene;
+        private _renderingGroups;
+        private _depthBufferAlreadyCleaned;
+        constructor(scene: Scene);
+        private _renderParticles(index, activeMeshes);
+        private _renderSprites(index);
+        private _clearDepthBuffer();
+        render(customRenderFunction: (opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>) => void, activeMeshes: AbstractMesh[], renderParticles: boolean, renderSprites: boolean): void;
+        reset(): void;
+        dispatch(subMesh: SubMesh): void;
+    }
+}
+
+declare module BABYLON {
     class Sprite {
         name: string;
         position: Vector3;
@@ -5711,6 +5710,9 @@ declare module BABYLON {
     }
 }
 
+declare module BABYLON.Internals {
+}
+
 declare module BABYLON {
     class BaseTexture {
         name: string;
@@ -5898,9 +5900,6 @@ declare module BABYLON {
     }
 }
 
-declare module BABYLON.Internals {
-}
-
 declare module BABYLON {
     class CannonJSPlugin implements IPhysicsEnginePlugin {
         checkWithEpsilon: (value: number) => number;

文件差异内容过多而无法显示
+ 19 - 18
dist/preview release - alpha/babylon.2.2.js


+ 3 - 32
dist/preview release - alpha/babylon.2.2.max.js

@@ -7503,7 +7503,6 @@ var BABYLON;
             this.maximum = maximum;
             this.vectors = new Array();
             this.vectorsWorld = new Array();
-            this.vectorsWorldAA = new Array();
             // Bounding vectors            
             this.vectors.push(this.minimum.clone());
             this.vectors.push(this.maximum.clone());
@@ -7519,16 +7518,12 @@ var BABYLON;
             this.vectors[6].x = this.minimum.x;
             this.vectors.push(this.maximum.clone());
             this.vectors[7].y = this.minimum.y;
-            var index;
-            for (index = 0; index < 8; index++) {
-                this.vectorsWorldAA[index] = BABYLON.Vector3.Zero();
-            }
             // OBB
             this.center = this.maximum.add(this.minimum).scale(0.5);
             this.extendSize = this.maximum.subtract(this.minimum).scale(0.5);
             this.directions = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
             // World
-            for (index = 0; index < this.vectors.length; index++) {
+            for (var index = 0; index < this.vectors.length; index++) {
                 this.vectorsWorld[index] = BABYLON.Vector3.Zero();
             }
             this.minimumWorld = BABYLON.Vector3.Zero();
@@ -7558,30 +7553,6 @@ var BABYLON;
                 if (v.z > this.maximumWorld.z)
                     this.maximumWorld.z = v.z;
             }
-            this.vectorsWorldAA[0].x = this.minimumWorld.x;
-            this.vectorsWorldAA[0].y = this.minimumWorld.y;
-            this.vectorsWorldAA[0].z = this.minimumWorld.z;
-            this.vectorsWorldAA[1].x = this.minimumWorld.x;
-            this.vectorsWorldAA[1].y = this.maximumWorld.y;
-            this.vectorsWorldAA[1].z = this.minimumWorld.z;
-            this.vectorsWorldAA[2].x = this.maximumWorld.x;
-            this.vectorsWorldAA[2].y = this.minimumWorld.y;
-            this.vectorsWorldAA[2].z = this.minimumWorld.z;
-            this.vectorsWorldAA[3].x = this.maximumWorld.x;
-            this.vectorsWorldAA[3].y = this.maximumWorld.y;
-            this.vectorsWorldAA[3].z = this.minimumWorld.z;
-            this.vectorsWorldAA[4].x = this.minimumWorld.x;
-            this.vectorsWorldAA[4].y = this.minimumWorld.y;
-            this.vectorsWorldAA[4].z = this.maximumWorld.z;
-            this.vectorsWorldAA[5].x = this.minimumWorld.x;
-            this.vectorsWorldAA[5].y = this.maximumWorld.y;
-            this.vectorsWorldAA[5].z = this.maximumWorld.z;
-            this.vectorsWorldAA[6].x = this.maximumWorld.x;
-            this.vectorsWorldAA[6].y = this.minimumWorld.y;
-            this.vectorsWorldAA[6].z = this.maximumWorld.z;
-            this.vectorsWorldAA[7].x = this.maximumWorld.x;
-            this.vectorsWorldAA[7].y = this.maximumWorld.y;
-            this.vectorsWorldAA[7].z = this.maximumWorld.z;
             // OBB
             this.maximumWorld.addToRef(this.minimumWorld, this.center);
             this.center.scaleInPlace(0.5);
@@ -7591,10 +7562,10 @@ var BABYLON;
             this._worldMatrix = world;
         };
         BoundingBox.prototype.isInFrustum = function (frustumPlanes) {
-            return BoundingBox.IsInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);
         };
         BoundingBox.prototype.isCompletelyInFrustum = function (frustumPlanes) {
-            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);
         };
         BoundingBox.prototype.intersectsPoint = function (point) {
             var delta = -BABYLON.Engine.Epsilon;

文件差异内容过多而无法显示
+ 22 - 21
dist/preview release - alpha/babylon.2.2.noworker.js


+ 3 - 32
src/Culling/babylon.boundingBox.js

@@ -6,7 +6,6 @@ var BABYLON;
             this.maximum = maximum;
             this.vectors = new Array();
             this.vectorsWorld = new Array();
-            this.vectorsWorldAA = new Array();
             // Bounding vectors            
             this.vectors.push(this.minimum.clone());
             this.vectors.push(this.maximum.clone());
@@ -22,16 +21,12 @@ var BABYLON;
             this.vectors[6].x = this.minimum.x;
             this.vectors.push(this.maximum.clone());
             this.vectors[7].y = this.minimum.y;
-            var index;
-            for (index = 0; index < 8; index++) {
-                this.vectorsWorldAA[index] = BABYLON.Vector3.Zero();
-            }
             // OBB
             this.center = this.maximum.add(this.minimum).scale(0.5);
             this.extendSize = this.maximum.subtract(this.minimum).scale(0.5);
             this.directions = [BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero(), BABYLON.Vector3.Zero()];
             // World
-            for (index = 0; index < this.vectors.length; index++) {
+            for (var index = 0; index < this.vectors.length; index++) {
                 this.vectorsWorld[index] = BABYLON.Vector3.Zero();
             }
             this.minimumWorld = BABYLON.Vector3.Zero();
@@ -61,30 +56,6 @@ var BABYLON;
                 if (v.z > this.maximumWorld.z)
                     this.maximumWorld.z = v.z;
             }
-            this.vectorsWorldAA[0].x = this.minimumWorld.x;
-            this.vectorsWorldAA[0].y = this.minimumWorld.y;
-            this.vectorsWorldAA[0].z = this.minimumWorld.z;
-            this.vectorsWorldAA[1].x = this.minimumWorld.x;
-            this.vectorsWorldAA[1].y = this.maximumWorld.y;
-            this.vectorsWorldAA[1].z = this.minimumWorld.z;
-            this.vectorsWorldAA[2].x = this.maximumWorld.x;
-            this.vectorsWorldAA[2].y = this.minimumWorld.y;
-            this.vectorsWorldAA[2].z = this.minimumWorld.z;
-            this.vectorsWorldAA[3].x = this.maximumWorld.x;
-            this.vectorsWorldAA[3].y = this.maximumWorld.y;
-            this.vectorsWorldAA[3].z = this.minimumWorld.z;
-            this.vectorsWorldAA[4].x = this.minimumWorld.x;
-            this.vectorsWorldAA[4].y = this.minimumWorld.y;
-            this.vectorsWorldAA[4].z = this.maximumWorld.z;
-            this.vectorsWorldAA[5].x = this.minimumWorld.x;
-            this.vectorsWorldAA[5].y = this.maximumWorld.y;
-            this.vectorsWorldAA[5].z = this.maximumWorld.z;
-            this.vectorsWorldAA[6].x = this.maximumWorld.x;
-            this.vectorsWorldAA[6].y = this.minimumWorld.y;
-            this.vectorsWorldAA[6].z = this.maximumWorld.z;
-            this.vectorsWorldAA[7].x = this.maximumWorld.x;
-            this.vectorsWorldAA[7].y = this.maximumWorld.y;
-            this.vectorsWorldAA[7].z = this.maximumWorld.z;
             // OBB
             this.maximumWorld.addToRef(this.minimumWorld, this.center);
             this.center.scaleInPlace(0.5);
@@ -94,10 +65,10 @@ var BABYLON;
             this._worldMatrix = world;
         };
         BoundingBox.prototype.isInFrustum = function (frustumPlanes) {
-            return BoundingBox.IsInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);
         };
         BoundingBox.prototype.isCompletelyInFrustum = function (frustumPlanes) {
-            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);
         };
         BoundingBox.prototype.intersectsPoint = function (point) {
             var delta = -BABYLON.Engine.Epsilon;

+ 4 - 43
src/Culling/babylon.boundingBox.ts

@@ -5,7 +5,6 @@
         public extendSize: Vector3;
         public directions: Vector3[];
         public vectorsWorld: Vector3[] = new Array<Vector3>();
-        public vectorsWorldAA: Vector3[] = new Array<Vector3>();
         public minimumWorld: Vector3;
         public maximumWorld: Vector3;
 
@@ -33,19 +32,14 @@
 
             this.vectors.push(this.maximum.clone());
             this.vectors[7].y = this.minimum.y;
-
-            var index: number;
-            for (index = 0; index < 8; index++) {
-                this.vectorsWorldAA[index] = Vector3.Zero();
-            }
-
+            
             // OBB
             this.center = this.maximum.add(this.minimum).scale(0.5);
             this.extendSize = this.maximum.subtract(this.minimum).scale(0.5);
             this.directions = [Vector3.Zero(), Vector3.Zero(), Vector3.Zero()];
 
             // World
-            for (index = 0; index < this.vectors.length; index++) {
+            for (var index = 0; index < this.vectors.length; index++) {
                 this.vectorsWorld[index] = Vector3.Zero();
             }
             this.minimumWorld = Vector3.Zero();
@@ -82,39 +76,6 @@
                     this.maximumWorld.z = v.z;
             }
 
-            this.vectorsWorldAA[0].x = this.minimumWorld.x;
-            this.vectorsWorldAA[0].y = this.minimumWorld.y;
-            this.vectorsWorldAA[0].z = this.minimumWorld.z;
-
-            this.vectorsWorldAA[1].x = this.minimumWorld.x;
-            this.vectorsWorldAA[1].y = this.maximumWorld.y;
-            this.vectorsWorldAA[1].z = this.minimumWorld.z;
-
-            this.vectorsWorldAA[2].x = this.maximumWorld.x;
-            this.vectorsWorldAA[2].y = this.minimumWorld.y;
-            this.vectorsWorldAA[2].z = this.minimumWorld.z;
-
-            this.vectorsWorldAA[3].x = this.maximumWorld.x;
-            this.vectorsWorldAA[3].y = this.maximumWorld.y;
-            this.vectorsWorldAA[3].z = this.minimumWorld.z;
-
-
-            this.vectorsWorldAA[4].x = this.minimumWorld.x;
-            this.vectorsWorldAA[4].y = this.minimumWorld.y;
-            this.vectorsWorldAA[4].z = this.maximumWorld.z;
-
-            this.vectorsWorldAA[5].x = this.minimumWorld.x;
-            this.vectorsWorldAA[5].y = this.maximumWorld.y;
-            this.vectorsWorldAA[5].z = this.maximumWorld.z;
-
-            this.vectorsWorldAA[6].x = this.maximumWorld.x;
-            this.vectorsWorldAA[6].y = this.minimumWorld.y;
-            this.vectorsWorldAA[6].z = this.maximumWorld.z;
-
-            this.vectorsWorldAA[7].x = this.maximumWorld.x;
-            this.vectorsWorldAA[7].y = this.maximumWorld.y;
-            this.vectorsWorldAA[7].z = this.maximumWorld.z;
-
             // OBB
             this.maximumWorld.addToRef(this.minimumWorld, this.center);
             this.center.scaleInPlace(0.5);
@@ -127,11 +88,11 @@
         }
 
         public isInFrustum(frustumPlanes: Plane[]): boolean {
-            return BoundingBox.IsInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsInFrustum(this.vectorsWorld, frustumPlanes);
         }
 
         public isCompletelyInFrustum(frustumPlanes: Plane[]): boolean {
-            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorldAA, frustumPlanes);
+            return BoundingBox.IsCompletelyInFrustum(this.vectorsWorld, frustumPlanes);
         }
 
         public intersectsPoint(point: Vector3): boolean {