Skip to content

Commit 2b387c0

Browse files
committed
Add cylinder region extension
1 parent 1244f79 commit 2b387c0

File tree

2 files changed

+144
-0
lines changed

2 files changed

+144
-0
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# EXT_implicit_cylinder_region
2+
3+
## Contributors
4+
- Sean Lilley, Cesium
5+
- Janine Liu, Cesium
6+
7+
## Status
8+
Draft
9+
10+
## Dependencies
11+
Written against the glTF 2.0 specification.
12+
13+
## Overview
14+
15+
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.
16+
17+
`EXT_implicit_cylinder_region` is an extension on the `shape` object in `KHR_implicit_shapes`, where `type` should be set to `"cylinder region"`.
18+
19+
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.
20+
21+
### Details
22+
23+
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.
24+
25+
<table>
26+
<tr>
27+
<th>
28+
Example
29+
</th>
30+
</tr>
31+
<tr>
32+
<td><pre>
33+
"extensions": [
34+
{
35+
"KHR_implicit_shapes": {
36+
"shapes": [
37+
{
38+
"type": "cylinder region",
39+
"extensions": {
40+
"EXT_implicit_cylinder_region": {
41+
"minRadius": 0.5,
42+
"maxRadius": 1,
43+
"height": 2
44+
}
45+
}
46+
}
47+
]
48+
}
49+
}
50+
]
51+
</pre></td>
52+
<td>
53+
**TODO** visual example
54+
</td>
55+
</tr>
56+
</table>
57+
58+
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]`.
59+
60+
<table>
61+
<tr>
62+
<th>
63+
Example
64+
</th>
65+
</tr>
66+
<tr>
67+
<td><pre>
68+
"extensions": [
69+
{
70+
"KHR_implicit_shapes": {
71+
"shapes": [
72+
{
73+
"type": "cylinder region",
74+
"extensions": {
75+
"EXT_implicit_cylinder_region": {
76+
"minRadius": 0.5,
77+
"maxRadius": 1,
78+
"height": 2,
79+
"minAngle": 0
80+
"maxAngle": 1.5
81+
}
82+
}
83+
}
84+
]
85+
}
86+
}
87+
]
88+
</pre></td>
89+
<td>
90+
**TODO** visual example
91+
</td>
92+
</tr>
93+
</table>
94+
95+
## Optional vs. Required
96+
This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json",
4+
"title": "EXT_implicit_cylinder_region extension on KHR_implicit_shapes.shape",
5+
"type": "object",
6+
"description": "`EXT_implicit_cylinder_region` extension on `KHR_implicit_shapes.shape` to represent an implicit cylinder region in a glTF model.",
7+
"allOf": [
8+
{
9+
"$ref": "glTFProperty.schema.json"
10+
}
11+
],
12+
"properties": {
13+
"minRadius": {
14+
"type": "number",
15+
"description": "The inner radius of the cylinder region along the X and Z axes, in meters.",
16+
"minimum": 0
17+
},
18+
"maxRadius": {
19+
"type": "number",
20+
"description": "The outer radius of the cylinder region along the X and Z axes, in meters.",
21+
"minimum": 0
22+
},
23+
"height": {
24+
"type": "number",
25+
"description": "The height of the cylinder in meters along the Y-axis, in meters.",
26+
"minimum": 0
27+
},
28+
"minAngle": {
29+
"type": "number",
30+
"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].",
31+
"minimum": -3.14159265359,
32+
"maximum": 3.14159265359,
33+
"default": -3.14159265359
34+
},
35+
"maxAngle": {
36+
"type": "number",
37+
"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].",
38+
"minimum": -3.14159265359,
39+
"maximum": 3.14159265359,
40+
"default": 3.14159265359
41+
}
42+
},
43+
"required": [
44+
"minRadius",
45+
"maxRadius",
46+
"height"
47+
]
48+
}

0 commit comments

Comments
 (0)