Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(geospatial) makeOBBFromRegion docs #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading