Skip to content

Commit

Permalink
Bounds -> Slice
Browse files Browse the repository at this point in the history
  • Loading branch information
j9liu committed Jun 4, 2024
1 parent dc1029a commit 22e2c71
Show file tree
Hide file tree
Showing 17 changed files with 134 additions and 149 deletions.
63 changes: 41 additions & 22 deletions extensions/2.0/Vendor/EXT_implicit_geometry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ The `box` property represents an axis-aligned box that is centered at the origin
<table>
<tr>
<th>
Example
</th>
<th>
Visual
Example
</th>
</tr>
<tr>
Expand All @@ -75,7 +72,7 @@ The `box` property represents an axis-aligned box that is centered at the origin
]
</pre></td>
<td>
<img width="600px" src="figures/non-uniform-box.png"/>
<img src="figures/box.png"/>
</td>
</tr>
</table>
Expand All @@ -87,10 +84,7 @@ The `cylinder` property represents a cylinder that is aligned with the `y`-axis
<table>
<tr>
<th>
Example
</th>
<th>
Visual
Example
</th>
</tr>
<tr>
Expand All @@ -109,7 +103,7 @@ The `cylinder` property represents a cylinder that is aligned with the `y`-axis
]
</pre></td>
<td>
**TODO** visual example
<img src="figures/cylinder.png"/>
</td>
</tr>
</table>
Expand All @@ -121,10 +115,7 @@ The `sphere` property represents a sphere that is centered at the origin. The `r
<table>
<tr>
<th>
Example
</th>
<th>
Visual
Example
</th>
</tr>
<tr>
Expand All @@ -142,7 +133,7 @@ The `sphere` property represents a sphere that is centered at the origin. The `r
]
</pre></td>
<td>
**TODO** visual example
<img src="figures/sphere.png"/>
</td>
</tr>
</table>
Expand All @@ -156,10 +147,7 @@ The `ellipsoid` property represents an ellipsoid that is centered at the origin.
<table>
<tr>
<th>
Example
</th>
<th>
Visual
Example
</th>
</tr>
<tr>
Expand All @@ -168,7 +156,7 @@ The `ellipsoid` property represents an ellipsoid that is centered at the origin.
{
"extensions": {
"EXT_implicit_geometry": {
"ellpisoid": {
"ellipsoid": {
"radii": [2, 3, 4]
}
}
Expand All @@ -185,9 +173,40 @@ The `ellipsoid` property represents an ellipsoid that is centered at the origin.
### Region
The `region` property represents a region above the surface of an ellipsoid. Though the ellipsoid itself is centered at the origin, the region may be distant from the origin due to its properties.
The `region` property represents a region extruded from the surface of a ellipsoid. The ellipsoid itself is not part of the geometry; it is merely used as reference from which the actual region is defined.
The reference ellipsoid is centered at the origin. The `semiMajorAxisRadius` indicates the radii 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 `heightFromSurface` property indicates the height of the region from the ellipsoid's surface, in meters. In other words, the region begins atop ellipsoid's surface, and is then extruded outwards to the specified height.
The `semiMajorAxis` property indicates the radii of the ellipsoid in meters along the `x`, `y`, and `z` axes.
<table>
<tr>
<th>
Example
</th>
</tr>
<tr>
<td><pre>
"primitives": [
{
"extensions": {
"EXT_implicit_geometry": {
"region": {
"semiMajorAxisRadius": 4,
"semiMinorAxisRadius": 2,
"heightFromSurface": 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,12 @@
"properties": {
"size": {
"type": "array",
"description": "The size of the box in three dimensions.",
"description": "The size of the box in meters.",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"bounds": {
"$ref": "box.bounds.schema.json",
"description": "The optional bounds of the box."
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"properties": {
"radius": {
"type": "number",
"description": "The radius of the cylinder in local space.",
"description": "The radius of the cylinder in meters.",
"minimum": 0
},
"height": {
"type": "number",
"description": "The height of the cylinder in local space.",
"description": "The height of the cylinder in meters.",
"minimum": 0
},
"bounds": {
"$ref": "cylinder.bounds.schema.json",
"description": "The optional bounds of the cylinder."
"slice": {
"$ref": "cylinder.slice.schema.json",
"description": "The optionally-defined slice of the cylinder."
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "cylinder.bounds.schema.json",
"title": "Cylinder Bounds",
"$id": "cylinder.slice.schema.json",
"title": "Cylinder Slice",
"type": "object",
"description": "A set of bounds for an implicit cylinder surface. Defines the subsection of the cylinder that the implicit volume actually occupies.",
"description": "A slice of an implicit cylinder. Defines the subsection of the cylinder that the implicit volume actually occupies.",
"allOf": [
{
"$ref": "glTFProperty.schema.json"
Expand All @@ -12,42 +12,42 @@
"properties": {
"minRadius": {
"type": "number",
"description": "The minimum radial bound of the cylinder.",
"description": "The start of the slice along the radius of the cylinder.",
"minimum": 0,
"maximum": 1,
"default": 0
},
"maxRadius": {
"type": "number",
"description": "The maximum radial bound of the cylinder.",
"description": "The end of the slice along the radius of the cylinder.",
"minimum": 0,
"maximum": 1,
"default": 1
},
"minHeight": {
"type": "number",
"description": "The minimum height bound of the cylinder.",
"description": "The start of the slice along the height of the cylinder.",
"minimum": 0,
"maximum": 1,
"default": 0
},
"maxHeight": {
"type": "number",
"description": "The maximum height bound of the cylinder.",
"description": "The end of the slice along the height of the cylinder.",
"minimum": 0,
"maximum": 1,
"default": 1
},
"minAngle": {
"type": "number",
"description": "The maximum angular bound of the cylinder in radians. Values must be in the range [-pi, pi].",
"description": "The start of the slice along the angle of the cylinder. Values must be in the range [-pi, pi].",
"minimum": -3.14159265359,
"maximum": 3.14159265359,
"default": -3.14159265359
},
"maxAngle": {
"type": "number",
"description": "The maximum angular bound of the cylinder in radians. Values must be in the range [-pi, pi].",
"description": "The end of the slice along the angle of the cylinder. Values must be in the range [-pi, pi].",
"minimum": -3.14159265359,
"maximum": 3.14159265359,
"default": 3.14159265359
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
"properties": {
"radii": {
"type": "array",
"description": "The radii of the ellipsoid in meters along the X, Y, and Z axes in local space.",
"description": "The radii of the ellipsoid along the X, Y, and Z axes in meters.",
"items": {
"type": "number",
"minimum": 0
},
"minItems": 3,
"maxItems": 3
},
"bounds": {
"$ref": "ellipsoid.bounds.schema.json",
"description": "The optional bounds of the ellipsoid."
"slice": {
"$ref": "ellipsoid.slice.schema.json",
"description": "The optionally-defined slice of the ellipsoid."
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "mesh.primitive.EXT_implicit_geometry.schema.json",
"title": "EXT_primitive_voxels glTF Mesh Primitive extension",
"type": "object",
"description": "`EXT_implicit_geometry` extension for a primitive in a glTF model, to define implicit 3D geometry",
"description": "`EXT_implicit_geometry` extension for a primitive in a glTF model to represent implicit 3D geometry",
"allOf": [
{
"$ref": "glTFProperty.schema.json"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
"properties": {
"semiMajorAxisRadius": {
"type": "number",
"description": "The radius of the reference ellipsoid along its semi-major axis in meters.",
"description": "The radius along the semi-major axis of the reference ellipsoid in meters.",
"minimum": 0
},
"semiMinorAxisRadius": {
"type": "number",
"description": "The radius of the reference ellipsoid along its semi-minor axis in meters.",
"description": "The radius along the semi-minor axis of the reference ellipsoid in meters.",
"minimum": 0
},
"heightFromSurface": {
"type": "number",
"description": "The height of this region from the surface of the reference ellipsoid in meters.",
},
"bounds": {
"$ref": "region.bounds.schema.json",
"description": "The optional bounds of the region."
"slice": {
"$ref": "region.slice.schema.json",
"description": "The optionally-defined slice of the region."
}
},
"required": [
Expand Down
Loading

0 comments on commit 22e2c71

Please sign in to comment.