Skip to content

Commit

Permalink
Fix types for calcAabb functions (#6596)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott authored and marklundin committed May 31, 2024
1 parent ef587ef commit d1430e9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/scene/gsplat/gsplat-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,14 @@ class GSplatData {
return this.isCompressed ? new SplatCompressedIterator(this, p, r, s, c) : new SplatIterator(this, p, r, s, c);
}

// calculafte a pessimistic aabb, which is faster than calculating an exact aabb
/**
* Calculate pessimistic scene aabb taking into account splat size. This is faster than
* calculating an exact aabb.
*
* @param {BoundingBox} result - Where to store the resulting bounding box.
* @param {(i: number) => boolean} [pred] - Optional predicate function to filter splats.
* @returns {boolean} - Whether the calculation was successful.
*/
calcAabb(result, pred) {
let mx, my, mz, Mx, My, Mz;
let first = true;
Expand Down Expand Up @@ -379,7 +386,7 @@ class GSplatData {
* Calculate exact scene aabb taking into account splat size
*
* @param {BoundingBox} result - Where to store the resulting bounding box.
* @param {(i) => boolean} [pred] - Optional predicate function to filter splats.
* @param {(i: number) => boolean} [pred] - Optional predicate function to filter splats.
* @returns {boolean} - Whether the calculation was successful.
*/
calcAabbExact(result, pred) {
Expand Down

0 comments on commit d1430e9

Please sign in to comment.