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

Revise EXT_primitive_voxels #69

Draft
wants to merge 17 commits into
base: ext-primitive-voxels
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
96 changes: 96 additions & 0 deletions extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# EXT_implicit_cylinder_region

## Contributors
- Sean Lilley, Cesium
- Janine Liu, Cesium

## Status
Draft

## Dependencies
Written against the glTF 2.0 specification.

## Overview

This extension adds an cylinder-based region as an additional shape type to the [`KHR_implicit_shapes`](TODO) extension. Cylinder-based regions are useful for visualizing real-world data that is captured by cylindrical sensors.

`EXT_implicit_cylinder_region` is an extension on the `shape` object in `KHR_implicit_shapes`, where `type` should be set to `"cylinder region"`.

The extension's properties specify 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; the region may be hollow inside, like a tube. However, an inner radius of `0` results in a completely solid cylinder volume.

### 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><pre>
"extensions": [
{
"KHR_implicit_shapes": {
"shapes": [
{
"type": "cylinder region",
"extensions": {
"EXT_implicit_cylinder_region": {
"minRadius": 0.5,
"maxRadius": 1,
"height": 2
}
}
}
]
}
}
]
</pre></td>
<td>
**TODO** visual example
</td>
</tr>
</table>

A cylinder region may also be confined to a specific angular range. The `minAngle` and `maxAngle` properties represent the angles at which the region starts and stops on the cylinder. The cylinder's angular bounds are defined in radians within the range `[-pi, pi]`.

<table>
<tr>
<th>
Example
</th>
</tr>
<tr>
<td><pre>
"extensions": [
{
"KHR_implicit_shapes": {
"shapes": [
{
"type": "cylinder region",
"extensions": {
"EXT_implicit_cylinder_region": {
"minRadius": 0.5,
"maxRadius": 1,
"height": 2,
"minAngle": 0
"maxAngle": 1.5
}
}
}
]
}
}
]
</pre></td>
<td>
**TODO** visual example
</td>
</tr>
</table>

## Optional vs. Required
This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list.
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": "`EXT_implicit_cylinder_region` extension on `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"
]
}
64 changes: 64 additions & 0 deletions extensions/2.0/Vendor/EXT_implicit_ellipsoid_region/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# EXT_implicit_ellipsoid_region

## Contributors
- Sean Lilley, Cesium
- Janine Liu, Cesium

## Status
Draft

## Dependencies
Written against the glTF 2.0 specification.

## Overview

This extension adds an ellipsoid-based region as an additional shape type to the [`KHR_implicit_shapes`](TODO) extension. Ellipsoid-based 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` is an extension on the `shape` object in `KHR_implicit_shapes`, where `type` should be set to `"ellipsoid region"`.

The extension's properties specify a region extruded from the surface of an ellipsoid. The ellipsoid itself is not necessarily part of the volume; it is merely used as reference from which the actual region is defined. However, a region may be extended beneath the surface of the ellipsoid, and thus can possibly contain the entire ellipsoid volume if desired.

### Details

The reference ellipsoid is centered at the origin. The `semiMajorAxisRadius` indicates the radii of the ellipsoid in meters along the `x` and `z` axes. These axes are made equal as a conscious decision to simplify the math implemented for rendering regions.

The `semiMinorAxisRadius` indicates the radius of the ellipsoid in meters along the `y` axis.

The `minHeight` and `maxHeight` properties indicates the heights of the region from the ellipsoid's surface, in meters. The `minimum` height should be lower a value, but not necessarily closer to the surface of the ellipsoid. For example, `maxHeight` may be `10` while `minHeight` is `-100`.

<table>
<tr>
<th>
Example
</th>
</tr>
<tr>
<td><pre>
"extensions": [
{
"KHR_implicit_shapes": {
"shapes": [
{
"type": "ellipsoid region",
"extensions": {
"EXT_implicit_ellipsoid_region": {
"semiMajorAxisRadius": 4,
"semiMinorAxisRadius": 2,
"minHeight": 0,
"maxHeight": 0.5
}
}
}
]
}
}
]
</pre></td>
<td>
**TODO** visual example
</td>
</tr>
</table>

## Optional vs. Required
This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list.
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": "`EXT_implicit_ellipsoid_region` extension on `KHR_implicit_shapes.shape` to represent an implicit ellipsoid region in a glTF model. Useful for geospatial applications, such as Earth-conforming voxel data.",
"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"
]
}
Loading
Loading