diff --git a/docs/modules/geospatial/api-reference/ellipsoid-tangent-plane.md b/docs/modules/geospatial/api-reference/ellipsoid-tangent-plane.md new file mode 100644 index 00000000..c5021255 --- /dev/null +++ b/docs/modules/geospatial/api-reference/ellipsoid-tangent-plane.md @@ -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. diff --git a/docs/modules/geospatial/api-reference/image.png b/docs/modules/geospatial/api-reference/image.png new file mode 100644 index 00000000..40584ce0 Binary files /dev/null and b/docs/modules/geospatial/api-reference/image.png differ diff --git a/docs/modules/geospatial/api-reference/make-obb-from-region.md b/docs/modules/geospatial/api-reference/make-obb-from-region.md new file mode 100644 index 00000000..e69de29b diff --git a/docs/table-of-contents.json b/docs/table-of-contents.json index bf038978..ad244ded 100644 --- a/docs/table-of-contents.json +++ b/docs/table-of-contents.json @@ -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" ] }, diff --git a/docs/whats-new.md b/docs/whats-new.md index 8731eff1..09b4f124 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -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 diff --git a/modules/geospatial/src/make-obb-from-region.ts b/modules/geospatial/src/make-obb-from-region.ts index ec52a800..fcc7f304 100644 --- a/modules/geospatial/src/make-obb-from-region.ts +++ b/modules/geospatial/src/make-obb-from-region.ts @@ -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 {