Skip to content

Commit

Permalink
makeOBBFromRegion docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Jan 4, 2025
1 parent 5aa1d04 commit 3fbab26
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/modules/geospatial/api-reference/ellipsoid-tangent-plane.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# EllipsoidTangentPlane

TBA

Function to convert a geospatial region to an oriented bounding box using ellipsoid math. Computes an `OrientedBoundingBox` that bounds a region on the surface of the WGS84 ellipsoid. There are no guarantees about the orientation of the bounding box.

Parameters:

- `region: number[]` - The cartographic region (west, south, east, north, minimum height, maximum height) on the surface of the ellipsoid.

Returns:

- `OrientedBoundingBox` - The modified result parameter or a new OrientedBoundingBox instance if none was provided.
Binary file added docs/modules/geospatial/api-reference/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
1 change: 1 addition & 0 deletions docs/table-of-contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
"items": [
"modules/geospatial/README",
"modules/geospatial/api-reference/ellipsoid",
"modules/geospatial/api-reference/ellipsoid-tangent-plane",
"modules/geospatial/api-reference/helpers"
]
},
Expand Down
9 changes: 8 additions & 1 deletion docs/whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,14 @@ Goal: Stronger type guarantees for math classes via the new sized array types.

Release Date: TBD, maybe Q1, 2024.

Goal: Minor functionality additions, as required.
Goals:

- Functionality additions to improve 3D Tiles support in loaders.gl.

**`@math.gl/geopspatial`**

- `makeOBBFromRegion()` - New function that creates a cartesian oriented bounding box from a geospatial region.
- `EllipsoidTangentPlane` - New helper class for doing math on the ellipsoid surface.

## v4.1

Expand Down
4 changes: 2 additions & 2 deletions modules/geospatial/src/make-obb-from-region.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ const VECTOR3_UNIT_Z = new Vector3(0, 0, 1);
* Computes an OrientedBoundingBox that bounds a region on the surface of the WGS84 ellipsoid.
* There are no guarantees about the orientation of the bounding box.
*
* @param {number[]} region The cartographic region ([west, south, east, north, minimum height, maximum height])
* @param region The cartographic region ([west, south, east, north, minimum height, maximum height])
* on the surface of the ellipsoid.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
* @returns The modified result parameter or a new OrientedBoundingBox instance if none was provided.
*/
// eslint-disable-next-line max-statements
export function makeOBBfromRegion(region: number[]): OrientedBoundingBox {
Expand Down

0 comments on commit 3fbab26

Please sign in to comment.