forked from KhronosGroup/glTF
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from CesiumGS/ext-primitive-voxels-revisions
Revise `EXT_primitive_voxels`
- Loading branch information
Showing
22 changed files
with
554 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# EXT_implicit_cylinder_region | ||
|
||
## Contributors | ||
|
||
- Janine Liu, Cesium | ||
- Sean Lilley, Cesium | ||
|
||
## Status | ||
|
||
Draft | ||
|
||
## Dependencies | ||
|
||
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. | ||
|
||
## Overview | ||
|
||
This extension defines a cylinder-conforming region as an additional shape type for the `KHR_implicit_shapes` extension. These regions are useful for visualizing real-world data that has been captured by cylindrical sensors. | ||
|
||
`EXT_implicit_cylinder_region` extends the `shape` object in `KHR_implicit_shapes`. The `shape.type` should be set to `"cylinder region"`. The properties define a region following the surface of a cylinder between two different radius values. | ||
|
||
The cylinder does not need to be completely represented by the volume—for instance, the region may be hollow inside like a tube. However, an inner radius of `0` results in a completely solid cylinder. | ||
|
||
### Details | ||
|
||
The cylinder is centered at the origin, where the radius is measured along the `x` and `z` axes. The `height` of the cylinder is aligned with the `y` axis. | ||
|
||
<table> | ||
<tr> | ||
<th> | ||
Example | ||
</th> | ||
</tr> | ||
<tr> | ||
<td> | ||
|
||
```json | ||
"extensions": [ | ||
{ | ||
"KHR_implicit_shapes": { | ||
"shapes": [ | ||
{ | ||
"type": "cylinder region", | ||
"extensions": { | ||
"EXT_implicit_cylinder_region": { | ||
"minRadius": 0.5, | ||
"maxRadius": 1, | ||
"height": 2 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
``` | ||
|
||
</td> | ||
<td> | ||
<img src="figures/hollow-cylinder.png"> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
A cylinder region may also be confined to a certain angular range. The `minAngle` and `maxAngle` properties define the angles at which the region starts and stops on the cylinder. | ||
|
||
Angles are given in radians within the range `[-pi, pi]` and open clockwise around the cylinder (see figure below). | ||
|
||
![](figures/cylinder-angle.png) | ||
|
||
<table> | ||
<tr> | ||
<th> | ||
Example | ||
</th> | ||
</tr> | ||
<tr> | ||
<td> | ||
|
||
```json | ||
"extensions": [ | ||
{ | ||
"KHR_implicit_shapes": { | ||
"shapes": [ | ||
{ | ||
"type": "cylinder region", | ||
"extensions": { | ||
"EXT_implicit_cylinder_region": { | ||
"minRadius": 0.5, | ||
"maxRadius": 1, | ||
"height": 2, | ||
"minAngle": 0, | ||
"maxAngle": 3.1415 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
``` | ||
</td> | ||
<td> | ||
<img src="figures/half-cylinder.png"> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
## Optional vs. Required | ||
This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list. |
Binary file added
BIN
+29.7 KB
extensions/2.0/Vendor/EXT_implicit_cylinder_region/figures/cylinder-angle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.27 KB
extensions/2.0/Vendor/EXT_implicit_cylinder_region/figures/half-cylinder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.8 KB
extensions/2.0/Vendor/EXT_implicit_cylinder_region/figures/hollow-cylinder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
...der_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json", | ||
"title": "EXT_implicit_cylinder_region extension on KHR_implicit_shapes.shape", | ||
"type": "object", | ||
"description": "Extension of `KHR_implicit_shapes.shape` to represent an implicit cylinder region in a glTF model.", | ||
"allOf": [ | ||
{ | ||
"$ref": "glTFProperty.schema.json" | ||
} | ||
], | ||
"properties": { | ||
"minRadius": { | ||
"type": "number", | ||
"description": "The inner radius of the cylinder region along the X and Z axes, in meters.", | ||
"minimum": 0 | ||
}, | ||
"maxRadius": { | ||
"type": "number", | ||
"description": "The outer radius of the cylinder region along the X and Z axes, in meters.", | ||
"minimum": 0 | ||
}, | ||
"height": { | ||
"type": "number", | ||
"description": "The height of the cylinder in meters along the Y-axis, in meters.", | ||
"minimum": 0 | ||
}, | ||
"minAngle": { | ||
"type": "number", | ||
"description": "The minimum angle of the cylinder region in radians. In other words, this is the angle where the cylinder region starts. Must be in the range [-pi, pi].", | ||
"minimum": -3.14159265359, | ||
"maximum": 3.14159265359, | ||
"default": -3.14159265359 | ||
}, | ||
"maxAngle": { | ||
"type": "number", | ||
"description": "The maximum angle of the cylinder region in radians. In other words, this is the angle where the cylinder region ends. Must be in the range [-pi, pi].", | ||
"minimum": -3.14159265359, | ||
"maximum": 3.14159265359, | ||
"default": 3.14159265359 | ||
} | ||
}, | ||
"required": [ | ||
"minRadius", | ||
"maxRadius", | ||
"height" | ||
] | ||
} |
91 changes: 91 additions & 0 deletions
91
extensions/2.0/Vendor/EXT_implicit_ellipsoid_region/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# EXT_implicit_ellipsoid_region | ||
|
||
## Contributors | ||
|
||
- Janine Liu, Cesium | ||
- Sean Lilley, Cesium | ||
|
||
## Status | ||
|
||
Draft | ||
|
||
## Dependencies | ||
|
||
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. | ||
|
||
## Overview | ||
|
||
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. | ||
|
||
`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. | ||
|
||
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. | ||
|
||
### Details | ||
|
||
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. | ||
|
||
> The `x` and `z` radii are made equal to simplify the math required to render implicit regions along the ellipsoid. | ||
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. | ||
|
||
This example corresponds to the image below it: | ||
|
||
```json | ||
"extensions": [ | ||
{ | ||
"KHR_implicit_shapes": { | ||
"shapes": [ | ||
{ | ||
"type": "ellipsoid region", | ||
"extensions": { | ||
"EXT_implicit_ellipsoid_region": { | ||
"semiMajorAxisRadius": 3.5, | ||
"semiMinorAxisRadius": 2, | ||
"minHeight": 0, | ||
"maxHeight": 0.5 | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
``` | ||
|
||
![](figures/hollow-ellipsoid.png) | ||
|
||
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]`. | ||
|
||
```json | ||
"extensions": [ | ||
{ | ||
"KHR_implicit_shapes": { | ||
"shapes": [ | ||
{ | ||
"type": "ellipsoid region", | ||
"extensions": { | ||
"EXT_implicit_ellipsoid_region": { | ||
"semiMajorAxisRadius": 3.5, | ||
"semiMinorAxisRadius": 2, | ||
"minHeight": 0, | ||
"maxHeight": 0.5, | ||
"minLongitude": 0, | ||
"maxLongitude": 1.57079632679, | ||
"minLatitude": -0.78539816339, | ||
"maxLatitude": 0.78539816339, | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
``` | ||
|
||
![](figures/half-ellipsoid.png) | ||
|
||
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. | ||
|
||
## Optional vs. Required | ||
This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list. |
Binary file added
BIN
+29.9 KB
extensions/2.0/Vendor/EXT_implicit_ellipsoid_region/figures/half-ellipsoid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.1 KB
extensions/2.0/Vendor/EXT_implicit_ellipsoid_region/figures/hollow-ellipsoid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions
66
...id_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_ellipsoid_region.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"$id": "glTF.KHR_implicit_shapes.shape.EXT_implicit_ellipsoid_region.schema.json", | ||
"title": "EXT_implicit_ellipsoid_region extension on KHR_implicit_shapes.shape", | ||
"type": "object", | ||
"description": "Extension of `KHR_implicit_shapes.shape` to represent an implicit ellipsoid region in a glTF model.", | ||
"allOf": [ | ||
{ | ||
"$ref": "glTFProperty.schema.json" | ||
} | ||
], | ||
"properties": { | ||
"semiMajorAxisRadius": { | ||
"type": "number", | ||
"description": "The radius along the semi-major axis of the reference ellipsoid in meters. Corresponds to the radii along the X and Z axes.", | ||
"minimum": 0 | ||
}, | ||
"semiMinorAxisRadius": { | ||
"type": "number", | ||
"description": "The radius along the semi-minor axis of the reference ellipsoid in meters. Corresponds to the radius along the Y-axis.", | ||
"minimum": 0 | ||
}, | ||
"minHeight": { | ||
"type": "number", | ||
"description": "The minimum height of the region relative to the ellipsoid's surface, in meters. May be negative." | ||
}, | ||
"maxHeight": { | ||
"type": "number", | ||
"description": "The maximum height of the region relative to the ellipsoid's surface, in meters. May be negative." | ||
}, | ||
"minLatitude": { | ||
"type": "number", | ||
"description": "The minimum latitude (a.k.a. polar angle) of the region, in radians. Must be in the range [-pi/2, pi/2].", | ||
"minimum": -1.57079632679, | ||
"maximum": 1.57079632679, | ||
"default": -1.57079632679 | ||
}, | ||
"maxLatitude": { | ||
"type": "number", | ||
"description": "The maximum latitude (a.k.a. polar angle) of the region, in radians. Must be in the range [-pi/2, pi/2].", | ||
"minimum": -1.57079632679, | ||
"maximum": 1.57079632679, | ||
"default": 1.57079632679 | ||
}, | ||
"minLongitude": { | ||
"type": "number", | ||
"description": "The minimum longitude (a.k.a. azimuthal angle) of the region, in radians. Must be in the range [-pi, pi].", | ||
"minimum": -3.14159265359, | ||
"maximum": 3.14159265359, | ||
"default": -3.14159265359 | ||
}, | ||
"maxLongitude": { | ||
"type": "number", | ||
"description": "The maximum longitude (a.k.a. azimuthal angle) of the region, in radians. Must be in the range [-pi, pi].", | ||
"minimum": -3.14159265359, | ||
"maximum": 3.14159265359, | ||
"default": 3.14159265359 | ||
} | ||
}, | ||
"required": [ | ||
"semiMajorAxisRadius", | ||
"semiMinorAxisRadius", | ||
"minHeight", | ||
"maxHeight" | ||
] | ||
} |
Oops, something went wrong.