|
| 1 | +# EXT_implicit_ellipsoid_region |
| 2 | + |
| 3 | +## Contributors |
| 4 | + |
| 5 | +- Janine Liu, Cesium |
| 6 | +- Sean Lilley, Cesium |
| 7 | + |
| 8 | +## Status |
| 9 | + |
| 10 | +Draft |
| 11 | + |
| 12 | +## Dependencies |
| 13 | + |
| 14 | +Written against the glTF 2.0 specification. Depends on the [`KHR_implicit_shapes`](https://github.com/eoineoineoin/glTF/tree/refs/heads/collisionShapeMerge/extensions/2.0/Khronos/KHR_implicit_shapes) extension. |
| 15 | + |
| 16 | +## Overview |
| 17 | + |
| 18 | +This extension defines an ellipsoid-conforming region as an additional shape type for the `KHR_implicit_shapes` extension. These regions are commonly used in geospatial applications to describe volumes that conform to the curvature of the Earth, or other bodies. |
| 19 | + |
| 20 | +`EXT_implicit_ellipsoid_region` extends the `shape` object in `KHR_implicit_shapes`. The `shape.type` should be set to `"ellipsoid region"`. The properties define the region following the surface of the ellipsoid between two different height values. |
| 21 | + |
| 22 | +The volume does not necessarily contain the full ellipsoid—and for many geospatial use cases, it will not. Rather, the ellipsoid is used as a reference from which the actual region is extruded. However, a region may be extend beneath the surface of the ellipsoid. Given the right height values, the region could contain the entire ellipsoid if desired. |
| 23 | + |
| 24 | +### Details |
| 25 | + |
| 26 | +The reference ellipsoid is centered at the origin. The `semiMajorAxisRadius` indicates the radius of the ellipsoid in meters along the `x` and `z` axes. The `semiMinorAxisRadius` indicates the radius of the ellipsoid in meters along the `y` axis. |
| 27 | + |
| 28 | +> The `x` and `z` radii are made equal to simplify the math required to render implicit regions along the ellipsoid. |
| 29 | +
|
| 30 | +The `minHeight` and `maxHeight` properties indicate the heights of the region from the ellipsoid's surface in meters. A height of `0` sits right at the surface. Negative heights are also valid—they simply extend underneath the ellipsoid's surface. |
| 31 | + |
| 32 | +This example corresponds to the image below it: |
| 33 | + |
| 34 | +```json |
| 35 | +"extensions": [ |
| 36 | + { |
| 37 | + "KHR_implicit_shapes": { |
| 38 | + "shapes": [ |
| 39 | + { |
| 40 | + "type": "ellipsoid region", |
| 41 | + "extensions": { |
| 42 | + "EXT_implicit_ellipsoid_region": { |
| 43 | + "semiMajorAxisRadius": 3.5, |
| 44 | + "semiMinorAxisRadius": 2, |
| 45 | + "minHeight": 0, |
| 46 | + "maxHeight": 0.5 |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | + ] |
| 51 | + } |
| 52 | + } |
| 53 | +] |
| 54 | +``` |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | +An ellipsoid region may also be confined to a specific latitude and/or longitude range. The `minLatitude` and `maxLatitude` properties represent the latitude values at which the region starts and stops, defined in the range `[-pi/2, pi/2]`. Similarly, the `minLongitude` and `maxLongitude` properties represent the longitude bounds within the range `[-pi, pi]`. |
| 59 | + |
| 60 | +```json |
| 61 | +"extensions": [ |
| 62 | + { |
| 63 | + "KHR_implicit_shapes": { |
| 64 | + "shapes": [ |
| 65 | + { |
| 66 | + "type": "ellipsoid region", |
| 67 | + "extensions": { |
| 68 | + "EXT_implicit_ellipsoid_region": { |
| 69 | + "semiMajorAxisRadius": 3.5, |
| 70 | + "semiMinorAxisRadius": 2, |
| 71 | + "minHeight": 0, |
| 72 | + "maxHeight": 0.5, |
| 73 | + "minLongitude": 0, |
| 74 | + "maxLongitude": 1.57079632679, |
| 75 | + "minLatitude": -0.78539816339, |
| 76 | + "maxLatitude": 0.78539816339, |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | + ] |
| 81 | + } |
| 82 | + } |
| 83 | +] |
| 84 | +``` |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | +It is valid for the `maxLongitude` property to be less than `minLongitude`. This would define a region that crosses over the line at `-pi` or `pi`, equivalent to the International Date Line on Earth. |
| 89 | + |
| 90 | +## Optional vs. Required |
| 91 | +This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list. |
0 commit comments