David Catuhe 8 年之前
父节点
当前提交
fd518b368f

文件差异内容过多而无法显示
+ 2315 - 2311
dist/preview release/babylon.d.ts


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


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

@@ -13262,6 +13262,25 @@ var BABYLON;
             this._isDirty = true;
             return this;
         };
+        AbstractMesh.prototype.getHierarchyBoundingVectors = function () {
+            this.computeWorldMatrix();
+            var min = this.getBoundingInfo().boundingBox.minimumWorld;
+            var max = this.getBoundingInfo().boundingBox.maximumWorld;
+            var descendants = this.getDescendants(false, function (node) { return node.subMeshes; });
+            for (var _i = 0, descendants_1 = descendants; _i < descendants_1.length; _i++) {
+                var descendant = descendants_1[_i];
+                var childMesh = descendant;
+                childMesh.computeWorldMatrix();
+                var minBox = childMesh.getBoundingInfo().boundingBox.minimumWorld;
+                var maxBox = childMesh.getBoundingInfo().boundingBox.maximumWorld;
+                BABYLON.Tools.CheckExtends(minBox, min, max);
+                BABYLON.Tools.CheckExtends(maxBox, min, max);
+            }
+            return {
+                min: min,
+                max: max
+            };
+        };
         /**
          * Updates the mesh BoundingInfo object and all its children BoundingInfo objects also.
          * Returns the AbstractMesh.

文件差异内容过多而无法显示
+ 2315 - 2311
dist/preview release/babylon.module.d.ts


文件差异内容过多而无法显示
+ 44 - 44
dist/preview release/babylon.worker.js


文件差异内容过多而无法显示
+ 3387 - 3383
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差异内容过多而无法显示
+ 47 - 47
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.js


+ 19 - 0
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.max.js

@@ -13262,6 +13262,25 @@ var BABYLON;
             this._isDirty = true;
             return this;
         };
+        AbstractMesh.prototype.getHierarchyBoundingVectors = function () {
+            this.computeWorldMatrix();
+            var min = this.getBoundingInfo().boundingBox.minimumWorld;
+            var max = this.getBoundingInfo().boundingBox.maximumWorld;
+            var descendants = this.getDescendants(false, function (node) { return node.subMeshes; });
+            for (var _i = 0, descendants_1 = descendants; _i < descendants_1.length; _i++) {
+                var descendant = descendants_1[_i];
+                var childMesh = descendant;
+                childMesh.computeWorldMatrix();
+                var minBox = childMesh.getBoundingInfo().boundingBox.minimumWorld;
+                var maxBox = childMesh.getBoundingInfo().boundingBox.maximumWorld;
+                BABYLON.Tools.CheckExtends(minBox, min, max);
+                BABYLON.Tools.CheckExtends(maxBox, min, max);
+            }
+            return {
+                min: min,
+                max: max
+            };
+        };
         /**
          * Updates the mesh BoundingInfo object and all its children BoundingInfo objects also.
          * Returns the AbstractMesh.

文件差异内容过多而无法显示
+ 3387 - 3383
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 24 - 0
src/Mesh/babylon.abstractMesh.ts

@@ -1155,6 +1155,30 @@
             return this;
         }
 
+        public getHierarchyBoundingVectors(): { min: Vector3, max: Vector3 }{
+            this.computeWorldMatrix();
+            let min = this.getBoundingInfo().boundingBox.minimumWorld;
+            let max = this.getBoundingInfo().boundingBox.maximumWorld;
+
+            let descendants = this.getDescendants(false, (node) => (<any>node).subMeshes);
+
+            for (var descendant of descendants) {
+                let childMesh = <AbstractMesh>descendant;
+
+                childMesh.computeWorldMatrix();
+                var minBox = childMesh.getBoundingInfo().boundingBox.minimumWorld;
+                var maxBox = childMesh.getBoundingInfo().boundingBox.maximumWorld;
+
+                Tools.CheckExtends(minBox, min, max);
+                Tools.CheckExtends(maxBox, min, max);
+            }
+
+            return {
+                min: min,
+                max: max
+            }
+        }
+
         /**
          * Updates the mesh BoundingInfo object and all its children BoundingInfo objects also.  
          * Returns the AbstractMesh.