From 2b387c06af3d7361b79051842365197d554ae196 Mon Sep 17 00:00:00 2001 From: Janine Liu Date: Fri, 25 Oct 2024 18:04:50 -0400 Subject: [PATCH] Add cylinder region extension --- .../EXT_implicit_cylinder_region/README.md | 96 +++++++++++++++++++ ...e.EXT_implicit_cylinder_region.schema.json | 48 ++++++++++ 2 files changed, 144 insertions(+) create mode 100644 extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md create mode 100644 extensions/2.0/Vendor/EXT_implicit_cylinder_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json diff --git a/extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md b/extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md new file mode 100644 index 0000000000..deca7d3aba --- /dev/null +++ b/extensions/2.0/Vendor/EXT_implicit_cylinder_region/README.md @@ -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. + + + + + + + + + +
+ Example +
+    "extensions": [
+      {
+        "KHR_implicit_shapes": {
+          "shapes": [
+            {
+              "type": "cylinder region",
+              "extensions": {
+                "EXT_implicit_cylinder_region": {
+                  "minRadius": 0.5,
+                  "maxRadius": 1,
+                  "height": 2
+                }
+              }
+            }
+          ]
+        }
+      }
+    ]
+    
+ **TODO** visual example +
+ +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]`. + + + + + + + + + +
+ Example +
+    "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
+                }
+              }
+            }
+          ]
+        }
+      }
+    ]
+    
+ **TODO** visual example +
+ +## Optional vs. Required +This extension is required, meaning it should be placed in both the `extensionsUsed` list and `extensionsRequired` list. \ No newline at end of file diff --git a/extensions/2.0/Vendor/EXT_implicit_cylinder_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json b/extensions/2.0/Vendor/EXT_implicit_cylinder_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json new file mode 100644 index 0000000000..74a4fdd290 --- /dev/null +++ b/extensions/2.0/Vendor/EXT_implicit_cylinder_region/schema/glTF.KHR_implicit_shapes.shape.EXT_implicit_cylinder_region.schema.json @@ -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" + ] +} \ No newline at end of file