소스 검색

Merge pull request #6511 from tibotiber/docs/shallow-bounding

Add note on shallow bounding of getBoundingInfo
sebavan 6 년 전
부모
커밋
5467f52de8
2개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      dist/preview release/what's new.md
  2. 3 1
      src/Meshes/abstractMesh.ts

+ 3 - 0
dist/preview release/what's new.md

@@ -63,6 +63,9 @@
 - Added `ShaderMaterial.setColor4Array` ([JonathanTron](https://github.com/JonathanTron/))
 - Added `ShaderMaterial.setArray4` ([JonathanTron](https://github.com/JonathanTron/))
 
+### Documentation
+- Added a note on shallow bounding of getBoundingInfo ([tibotiber](https://github.com/tibotiber))
+
 ## Bug fixes
 - Added support for `AnimationGroup` serialization ([Drigax](https://github.com/drigax/))
 - Removing assetContainer from scene will also remove gui layers ([TrevorDev](https://github.com/TrevorDev))

+ 3 - 1
src/Meshes/abstractMesh.ts

@@ -958,7 +958,9 @@ export class AbstractMesh extends TransformNode implements IDisposable, ICullabl
     }
 
     /**
-     * Returns the mesh BoundingInfo object or creates a new one and returns if it was undefined
+     * Returns the mesh BoundingInfo object or creates a new one and returns if it was undefined.
+     * Note that it returns a shallow bounding of the mesh (i.e. it does not include children).
+     * To get the full bounding of all children, call `getHierarchyBoundingVectors` instead.
      * @returns a BoundingInfo
      */
     public getBoundingInfo(): BoundingInfo {