David Catuhe 7 年之前
父節點
當前提交
9ec492ec8b

File diff suppressed because it is too large
+ 11797 - 11738
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


+ 57 - 0
dist/preview release/babylon.max.js

@@ -12709,6 +12709,7 @@ var BABYLON;
          */
         Engine.prototype.clear = function (color, backBuffer, depth, stencil) {
             if (stencil === void 0) { stencil = false; }
+            this.applyStates();
             var mode = 0;
             if (backBuffer && color) {
                 this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);
@@ -92272,6 +92273,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var CannonJSPlugin = /** @class */ (function () {
         function CannonJSPlugin(_useDeltaForWorldStep, iterations) {
             if (_useDeltaForWorldStep === void 0) { _useDeltaForWorldStep = true; }
@@ -92836,6 +92838,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var OimoJSPlugin = /** @class */ (function () {
         function OimoJSPlugin(iterations) {
             this.name = "OimoJSPlugin";
@@ -98492,8 +98495,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Class used to store a cell in an octree
+     * @see http://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var OctreeBlock = /** @class */ (function () {
+        /**
+         * Creates a new block
+         * @param minPoint defines the minimum vector (in world space) of the block's bounding box
+         * @param maxPoint defines the maximum vector (in world space) of the block's bounding box
+         * @param capacity defines the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+         * @param depth defines the current depth of this block in the octree
+         * @param maxDepth defines the maximal depth allowed (beyond this value, the capacity is ignored)
+         * @param creationFunc defines a callback to call when an element is added to the block
+         */
         function OctreeBlock(minPoint, maxPoint, capacity, depth, maxDepth, creationFunc) {
+            /**
+             * Gets the content of the current block
+             */
             this.entries = new Array();
             this._boundingVectors = new Array();
             this._capacity = capacity;
@@ -98519,6 +98538,9 @@ var BABYLON;
         }
         Object.defineProperty(OctreeBlock.prototype, "capacity", {
             // Property
+            /**
+             * Gets the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+             */
             get: function () {
                 return this._capacity;
             },
@@ -98526,6 +98548,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "minPoint", {
+            /**
+             * Gets the minimum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._minPoint;
             },
@@ -98533,6 +98558,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "maxPoint", {
+            /**
+             * Gets the maximum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._maxPoint;
             },
@@ -98540,6 +98568,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Add a new element to this block
+         * @param entry defines the element to add
+         */
         OctreeBlock.prototype.addEntry = function (entry) {
             if (this.blocks) {
                 for (var index = 0; index < this.blocks.length; index++) {
@@ -98553,12 +98585,22 @@ var BABYLON;
                 this.createInnerBlocks();
             }
         };
+        /**
+         * Add an array of elements to this block
+         * @param entries defines the array of elements to add
+         */
         OctreeBlock.prototype.addEntries = function (entries) {
             for (var index = 0; index < entries.length; index++) {
                 var mesh = entries[index];
                 this.addEntry(mesh);
             }
         };
+        /**
+         * Test if the current block intersects the furstum planes and if yes, then add its content to the selection array
+         * @param frustumPlanes defines the frustum planes to test
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.select = function (frustumPlanes, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IsInFrustum(this._boundingVectors, frustumPlanes)) {
                 if (this.blocks) {
@@ -98576,6 +98618,13 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.intersects = function (sphereCenter, sphereRadius, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IntersectsSphere(this._minPoint, this._maxPoint, sphereCenter, sphereRadius)) {
                 if (this.blocks) {
@@ -98593,6 +98642,11 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given ray and if yes, then add its content to the selection array
+         * @param ray defines the ray to test with
+         * @param selection defines the array to store current content if selection is positive
+         */
         OctreeBlock.prototype.intersectsRay = function (ray, selection) {
             if (ray.intersectsBoxMinMax(this._minPoint, this._maxPoint)) {
                 if (this.blocks) {
@@ -98605,6 +98659,9 @@ var BABYLON;
                 selection.concatWithNoDuplicate(this.entries);
             }
         };
+        /**
+         * Subdivide the content into child blocks (this block will then be empty)
+         */
         OctreeBlock.prototype.createInnerBlocks = function () {
             BABYLON.Octree._CreateBlocks(this._minPoint, this._maxPoint, this.entries, this._capacity, this._depth, this._maxDepth, this, this._creationFunc);
         };

+ 57 - 0
dist/preview release/babylon.no-module.max.js

@@ -12676,6 +12676,7 @@ var BABYLON;
          */
         Engine.prototype.clear = function (color, backBuffer, depth, stencil) {
             if (stencil === void 0) { stencil = false; }
+            this.applyStates();
             var mode = 0;
             if (backBuffer && color) {
                 this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);
@@ -92239,6 +92240,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var CannonJSPlugin = /** @class */ (function () {
         function CannonJSPlugin(_useDeltaForWorldStep, iterations) {
             if (_useDeltaForWorldStep === void 0) { _useDeltaForWorldStep = true; }
@@ -92803,6 +92805,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var OimoJSPlugin = /** @class */ (function () {
         function OimoJSPlugin(iterations) {
             this.name = "OimoJSPlugin";
@@ -98459,8 +98462,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Class used to store a cell in an octree
+     * @see http://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var OctreeBlock = /** @class */ (function () {
+        /**
+         * Creates a new block
+         * @param minPoint defines the minimum vector (in world space) of the block's bounding box
+         * @param maxPoint defines the maximum vector (in world space) of the block's bounding box
+         * @param capacity defines the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+         * @param depth defines the current depth of this block in the octree
+         * @param maxDepth defines the maximal depth allowed (beyond this value, the capacity is ignored)
+         * @param creationFunc defines a callback to call when an element is added to the block
+         */
         function OctreeBlock(minPoint, maxPoint, capacity, depth, maxDepth, creationFunc) {
+            /**
+             * Gets the content of the current block
+             */
             this.entries = new Array();
             this._boundingVectors = new Array();
             this._capacity = capacity;
@@ -98486,6 +98505,9 @@ var BABYLON;
         }
         Object.defineProperty(OctreeBlock.prototype, "capacity", {
             // Property
+            /**
+             * Gets the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+             */
             get: function () {
                 return this._capacity;
             },
@@ -98493,6 +98515,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "minPoint", {
+            /**
+             * Gets the minimum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._minPoint;
             },
@@ -98500,6 +98525,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "maxPoint", {
+            /**
+             * Gets the maximum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._maxPoint;
             },
@@ -98507,6 +98535,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Add a new element to this block
+         * @param entry defines the element to add
+         */
         OctreeBlock.prototype.addEntry = function (entry) {
             if (this.blocks) {
                 for (var index = 0; index < this.blocks.length; index++) {
@@ -98520,12 +98552,22 @@ var BABYLON;
                 this.createInnerBlocks();
             }
         };
+        /**
+         * Add an array of elements to this block
+         * @param entries defines the array of elements to add
+         */
         OctreeBlock.prototype.addEntries = function (entries) {
             for (var index = 0; index < entries.length; index++) {
                 var mesh = entries[index];
                 this.addEntry(mesh);
             }
         };
+        /**
+         * Test if the current block intersects the furstum planes and if yes, then add its content to the selection array
+         * @param frustumPlanes defines the frustum planes to test
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.select = function (frustumPlanes, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IsInFrustum(this._boundingVectors, frustumPlanes)) {
                 if (this.blocks) {
@@ -98543,6 +98585,13 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.intersects = function (sphereCenter, sphereRadius, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IntersectsSphere(this._minPoint, this._maxPoint, sphereCenter, sphereRadius)) {
                 if (this.blocks) {
@@ -98560,6 +98609,11 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given ray and if yes, then add its content to the selection array
+         * @param ray defines the ray to test with
+         * @param selection defines the array to store current content if selection is positive
+         */
         OctreeBlock.prototype.intersectsRay = function (ray, selection) {
             if (ray.intersectsBoxMinMax(this._minPoint, this._maxPoint)) {
                 if (this.blocks) {
@@ -98572,6 +98626,9 @@ var BABYLON;
                 selection.concatWithNoDuplicate(this.entries);
             }
         };
+        /**
+         * Subdivide the content into child blocks (this block will then be empty)
+         */
         OctreeBlock.prototype.createInnerBlocks = function () {
             BABYLON.Octree._CreateBlocks(this._minPoint, this._maxPoint, this.entries, this._capacity, this._depth, this._maxDepth, this, this._creationFunc);
         };

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.worker.js


+ 57 - 0
dist/preview release/es6.js

@@ -12676,6 +12676,7 @@ var BABYLON;
          */
         Engine.prototype.clear = function (color, backBuffer, depth, stencil) {
             if (stencil === void 0) { stencil = false; }
+            this.applyStates();
             var mode = 0;
             if (backBuffer && color) {
                 this._gl.clearColor(color.r, color.g, color.b, color.a !== undefined ? color.a : 1.0);
@@ -92239,6 +92240,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var CannonJSPlugin = /** @class */ (function () {
         function CannonJSPlugin(_useDeltaForWorldStep, iterations) {
             if (_useDeltaForWorldStep === void 0) { _useDeltaForWorldStep = true; }
@@ -92803,6 +92805,7 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /** @hidden */
     var OimoJSPlugin = /** @class */ (function () {
         function OimoJSPlugin(iterations) {
             this.name = "OimoJSPlugin";
@@ -98459,8 +98462,24 @@ var BABYLON;
 
 var BABYLON;
 (function (BABYLON) {
+    /**
+     * Class used to store a cell in an octree
+     * @see http://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     var OctreeBlock = /** @class */ (function () {
+        /**
+         * Creates a new block
+         * @param minPoint defines the minimum vector (in world space) of the block's bounding box
+         * @param maxPoint defines the maximum vector (in world space) of the block's bounding box
+         * @param capacity defines the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+         * @param depth defines the current depth of this block in the octree
+         * @param maxDepth defines the maximal depth allowed (beyond this value, the capacity is ignored)
+         * @param creationFunc defines a callback to call when an element is added to the block
+         */
         function OctreeBlock(minPoint, maxPoint, capacity, depth, maxDepth, creationFunc) {
+            /**
+             * Gets the content of the current block
+             */
             this.entries = new Array();
             this._boundingVectors = new Array();
             this._capacity = capacity;
@@ -98486,6 +98505,9 @@ var BABYLON;
         }
         Object.defineProperty(OctreeBlock.prototype, "capacity", {
             // Property
+            /**
+             * Gets the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+             */
             get: function () {
                 return this._capacity;
             },
@@ -98493,6 +98515,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "minPoint", {
+            /**
+             * Gets the minimum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._minPoint;
             },
@@ -98500,6 +98525,9 @@ var BABYLON;
             configurable: true
         });
         Object.defineProperty(OctreeBlock.prototype, "maxPoint", {
+            /**
+             * Gets the maximum vector (in world space) of the block's bounding box
+             */
             get: function () {
                 return this._maxPoint;
             },
@@ -98507,6 +98535,10 @@ var BABYLON;
             configurable: true
         });
         // Methods
+        /**
+         * Add a new element to this block
+         * @param entry defines the element to add
+         */
         OctreeBlock.prototype.addEntry = function (entry) {
             if (this.blocks) {
                 for (var index = 0; index < this.blocks.length; index++) {
@@ -98520,12 +98552,22 @@ var BABYLON;
                 this.createInnerBlocks();
             }
         };
+        /**
+         * Add an array of elements to this block
+         * @param entries defines the array of elements to add
+         */
         OctreeBlock.prototype.addEntries = function (entries) {
             for (var index = 0; index < entries.length; index++) {
                 var mesh = entries[index];
                 this.addEntry(mesh);
             }
         };
+        /**
+         * Test if the current block intersects the furstum planes and if yes, then add its content to the selection array
+         * @param frustumPlanes defines the frustum planes to test
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.select = function (frustumPlanes, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IsInFrustum(this._boundingVectors, frustumPlanes)) {
                 if (this.blocks) {
@@ -98543,6 +98585,13 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         OctreeBlock.prototype.intersects = function (sphereCenter, sphereRadius, selection, allowDuplicate) {
             if (BABYLON.BoundingBox.IntersectsSphere(this._minPoint, this._maxPoint, sphereCenter, sphereRadius)) {
                 if (this.blocks) {
@@ -98560,6 +98609,11 @@ var BABYLON;
                 }
             }
         };
+        /**
+         * Test if the current block intersect with the given ray and if yes, then add its content to the selection array
+         * @param ray defines the ray to test with
+         * @param selection defines the array to store current content if selection is positive
+         */
         OctreeBlock.prototype.intersectsRay = function (ray, selection) {
             if (ray.intersectsBoxMinMax(this._minPoint, this._maxPoint)) {
                 if (this.blocks) {
@@ -98572,6 +98626,9 @@ var BABYLON;
                 selection.concatWithNoDuplicate(this.entries);
             }
         };
+        /**
+         * Subdivide the content into child blocks (this block will then be empty)
+         */
         OctreeBlock.prototype.createInnerBlocks = function () {
             BABYLON.Octree._CreateBlocks(this._minPoint, this._maxPoint, this.entries, this._capacity, this._depth, this._maxDepth, this, this._creationFunc);
         };

File diff suppressed because it is too large
+ 1190 - 2395
dist/preview release/typedocValidationBaseline.json


+ 1 - 15
dist/preview release/viewer/babylon.viewer.d.ts

@@ -924,7 +924,7 @@ declare module BabylonViewer {
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 declare module BabylonViewer {
@@ -1558,20 +1558,6 @@ declare module BabylonViewer {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 declare module BabylonViewer {
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-declare module BabylonViewer {
 }
 declare module BabylonViewer {
     export interface IEnvironmentMapConfiguration {

File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.js


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/viewer/babylon.viewer.max.js


+ 1 - 18
dist/preview release/viewer/babylon.viewer.module.d.ts

@@ -985,14 +985,13 @@ declare module 'babylonjs-viewer/templating/viewerTemplatePlugin' {
 }
 
 declare module 'babylonjs-viewer/optimizer/custom' {
-    import { extendedUpgrade } from "babylonjs-viewer/optimizer/custom/extended";
     import { SceneManager } from "babylonjs-viewer/managers/sceneManager";
     /**
       *
       * @param name the name of the custom optimizer configuration
       * @param upgrade set to true if you want to upgrade optimizer and false if you want to degrade
       */
-    export function getCustomOptimizerByName(name: string, upgrade?: boolean): typeof extendedUpgrade;
+    export function getCustomOptimizerByName(name: string, upgrade?: boolean): (sceneManager: SceneManager) => boolean;
     export function registerCustomOptimizer(name: string, optimizer: (sceneManager: SceneManager) => boolean): void;
 }
 
@@ -1663,22 +1662,6 @@ declare module 'babylonjs-viewer/loader/plugins' {
     export function addLoaderPlugin(name: string, plugin: ILoaderPlugin): void;
 }
 
-declare module 'babylonjs-viewer/optimizer/custom/extended' {
-    import { SceneManager } from 'babylonjs-viewer/managers/sceneManager';
-    /**
-        * A custom upgrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedUpgrade(sceneManager: SceneManager): boolean;
-    /**
-        * A custom degrade-oriented function configuration for the scene optimizer.
-        *
-        * @param viewer the viewer to optimize
-        */
-    export function extendedDegrade(sceneManager: SceneManager): boolean;
-}
-
 declare module 'babylonjs-viewer/configuration/interfaces' {
     export * from 'babylonjs-viewer/configuration/interfaces/cameraConfiguration';
     export * from 'babylonjs-viewer/configuration/interfaces/colorGradingConfiguration';

+ 60 - 0
src/Culling/Octrees/babylon.octreeBlock.ts

@@ -1,6 +1,17 @@
 module BABYLON {
+    /**
+     * Class used to store a cell in an octree
+     * @see http://doc.babylonjs.com/how_to/optimizing_your_scene_with_octrees
+     */
     export class OctreeBlock<T> {
+        /**
+         * Gets the content of the current block
+         */
         public entries = new Array<T>();
+
+        /**
+         * Gets the list of block children
+         */
         public blocks: Array<OctreeBlock<T>>;
 
         private _depth: number;
@@ -11,6 +22,15 @@
         private _boundingVectors = new Array<Vector3>();
         private _creationFunc: (entry: T, block: OctreeBlock<T>) => void;
 
+        /**
+         * Creates a new block
+         * @param minPoint defines the minimum vector (in world space) of the block's bounding box
+         * @param maxPoint defines the maximum vector (in world space) of the block's bounding box 
+         * @param capacity defines the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+         * @param depth defines the current depth of this block in the octree
+         * @param maxDepth defines the maximal depth allowed (beyond this value, the capacity is ignored)
+         * @param creationFunc defines a callback to call when an element is added to the block
+         */
         constructor(minPoint: Vector3, maxPoint: Vector3, capacity: number, depth: number, maxDepth: number, creationFunc: (entry: T, block: OctreeBlock<T>) => void) {
             this._capacity = capacity;
             this._depth = depth;
@@ -43,19 +63,34 @@
         }
 
         // Property
+
+        /**
+         * Gets the maximum capacity of this block (if capacity is reached the block will be split into sub blocks)
+         */
         public get capacity(): number {
             return this._capacity;
         }
 
+        /**
+         * Gets the minimum vector (in world space) of the block's bounding box
+         */
         public get minPoint(): Vector3 {
             return this._minPoint;
         }
 
+        /**
+         * Gets the maximum vector (in world space) of the block's bounding box 
+         */
         public get maxPoint(): Vector3 {
             return this._maxPoint;
         }
 
         // Methods
+
+        /**
+         * Add a new element to this block
+         * @param entry defines the element to add
+         */
         public addEntry(entry: T): void {
             if (this.blocks) {
                 for (var index = 0; index < this.blocks.length; index++) {
@@ -72,6 +107,10 @@
             }
         }
 
+        /**
+         * Add an array of elements to this block
+         * @param entries defines the array of elements to add
+         */
         public addEntries(entries: T[]): void {
             for (var index = 0; index < entries.length; index++) {
                 var mesh = entries[index];
@@ -79,6 +118,12 @@
             }
         }
 
+        /**
+         * Test if the current block intersects the furstum planes and if yes, then add its content to the selection array
+         * @param frustumPlanes defines the frustum planes to test
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         public select(frustumPlanes: Plane[], selection: SmartArrayNoDuplicate<T>, allowDuplicate?: boolean): void {
             if (BoundingBox.IsInFrustum(this._boundingVectors, frustumPlanes)) {
                 if (this.blocks) {
@@ -97,6 +142,13 @@
             }
         }
 
+        /**
+         * Test if the current block intersect with the given bounding sphere and if yes, then add its content to the selection array
+         * @param sphereCenter defines the bounding sphere center
+         * @param sphereRadius defines the bounding sphere radius
+         * @param selection defines the array to store current content if selection is positive
+         * @param allowDuplicate defines if the selection array can contains duplicated entries
+         */
         public intersects(sphereCenter: Vector3, sphereRadius: number, selection: SmartArrayNoDuplicate<T>, allowDuplicate?: boolean): void {
             if (BoundingBox.IntersectsSphere(this._minPoint, this._maxPoint, sphereCenter, sphereRadius)) {
                 if (this.blocks) {
@@ -115,6 +167,11 @@
             }
         }
 
+        /**
+         * Test if the current block intersect with the given ray and if yes, then add its content to the selection array
+         * @param ray defines the ray to test with
+         * @param selection defines the array to store current content if selection is positive
+         */
         public intersectsRay(ray: Ray, selection: SmartArrayNoDuplicate<T>): void {
             if (ray.intersectsBoxMinMax(this._minPoint, this._maxPoint)) {
                 if (this.blocks) {
@@ -128,6 +185,9 @@
             }
         }
 
+        /**
+         * Subdivide the content into child blocks (this block will then be empty)
+         */
         public createInnerBlocks(): void {
             Octree._CreateBlocks(this._minPoint, this._maxPoint, this.entries, this._capacity, this._depth, this._maxDepth, this, this._creationFunc);
         }

+ 1 - 2
src/Physics/Plugins/babylon.cannonJSPlugin.ts

@@ -2,6 +2,7 @@
     //declare var require: any;
     declare var CANNON: any;
 
+    /** @hidden */
     export class CannonJSPlugin implements IPhysicsEnginePlugin {
 
         public world: any;
@@ -11,8 +12,6 @@
         //See https://github.com/schteppe/CANNON.js/blob/gh-pages/demos/collisionFilter.html
         public BJSCANNON = CANNON;
 
-
-
         public constructor(private _useDeltaForWorldStep: boolean = true, iterations: number = 10) {
             if (!this.isSupported()) {
                 Tools.Error("CannonJS is not available. Please make sure you included the js file.");

+ 1 - 0
src/Physics/Plugins/babylon.oimoJSPlugin.ts

@@ -1,6 +1,7 @@
 module BABYLON {
     declare var OIMO: any;
 
+    /** @hidden */
     export class OimoJSPlugin implements IPhysicsEnginePlugin {
 
         public world: any;