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.
- Loading branch information
Showing
2 changed files
with
144 additions
and
0 deletions.
There are no files selected for viewing
96 changes: 96 additions & 0 deletions
96
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,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. |
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": "`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" | ||
] | ||
} |