Skip to content

Use consistent min/maxBounds handling in VoxelProvider and VoxelInspector #12551

Closed
@jjhembd

Description

@jjhembd

Cesium3DTilesVoxelProvider.prototype.minBounds and .maxBounds are currently not consistent for different VoxelShapeTypes:

  • For VoxelShapeType.BOX, the bounds are set to VoxelBoxShape.DefaultMinBounds and VoxelBoxShape.DefaultMaxBounds. The actual physical bounds as defined in the boundingVolume in the tileset.json are incorporated into the shapeTransform
  • For VoxelShapeType.CYLINDER, the bounds are set to the physical values from 3DTILES_bounding_volume_cylinder. The shapeTransform is constructed from the translation and rotation from the same extension.
  • For VoxelShapeType.ELLIPSOID, the bounds are set to the physical longitude, latitude, and height bounds. The shapeTransform captures the scaling of the ellipsoid axes.

For better consistency, we should use physically meaningful values in all shape types. This will require us to:

  1. Update the getBoxShape helper function in Cesium3DTilesVoxelProvider to store the physical bounds. We will then need to verify the shapeTransform throughout the rendering flow, to make sure we are not double-scaling anything.
  2. Update the VoxelInspectorViewModel.voxelPrimitive setter to apply the actual bounds to the min and max of the range slider (they are currently set to constant values based on the DefaultMinBounds and DefaultMaxBounds)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions