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

Calculate oriented bounding box from bounding region for 3D tiles of Cesium's OSM buildings #3176

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion modules/tiles/src/tileset/helpers/bounding-volume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
return createBox(boundingVolumeHeader.box, transform, result);
}
if (boundingVolumeHeader.region) {
return createObbFromRegion(boundingVolumeHeader.region);
const obb = new OrientedBoundingBox();
obb.fromRegion(boundingVolumeHeader.region);

Check failure on line 46 in modules/tiles/src/tileset/helpers/bounding-volume.ts

View workflow job for this annotation

GitHub Actions / test

Property 'fromRegion' does not exist on type 'OrientedBoundingBox'.

return obb;
}

if (boundingVolumeHeader.sphere) {
Expand Down Expand Up @@ -224,7 +227,7 @@
* @param region - region 3D tiles bounding volume
* @returns OrientedBoundingBox instance
*/
function createObbFromRegion(region: number[]): OrientedBoundingBox {

Check failure on line 230 in modules/tiles/src/tileset/helpers/bounding-volume.ts

View workflow job for this annotation

GitHub Actions / test

'createObbFromRegion' is declared but its value is never read.
// [west, south, east, north, minimum height, maximum height]
// Latitudes and longitudes are in the WGS 84 datum as defined in EPSG 4979 and are in radians.
// Heights are in meters above (or below) the WGS 84 ellipsoid.
Expand Down
Loading