26.04 Boundary Module and Tile Modulev0.1.26 → v0.1.27
Changed in v0.1.27 (2026-04-02): section 26.04 boundary now simply use the 2D coord
→+3 −12
| v0.1.26 | v0.1.27 | ||
|---|---|---|---|
| 1 | # 26.04 Boundary Module and Tile Module | 1 | # 26.04 Boundary Module and Tile Module |
| 2 | 2 | ||
| 3 | ## 26.04.01 `Coordinate2D` and `Euler2D` Types | 3 | ## 26.04.01 Boundary Module |
| 4 | 4 | ||
| 5 | The 2-dimensional coordinate and rotation are represented by the types `Coordinate2D` and `Euler2D`, following the same conventions as the 3-dimensional ones defined in [[21-Scene]]. These types are defined as | ||
| 6 | ```ts | ||
| 7 | type Coordinate2D = [number, number] | ||
| 8 | type Euler2D = number | ||
| 9 | ``` | ||
| 10 | where `Coordinate2D` represents the coordinate $(x, y)$, in that order, and a positive `Euler2D` value means counterclockwise rotation. | ||
| 11 | |||
| 12 | ## 26.04.02 Boundary Module | ||
| 13 | |||
| 14 | The Boundary module modifies the scene by introducing a new member in `FormProperties`, defining a horizontal boundary of the scene. | 5 | The Boundary module modifies the scene by introducing a new member in `FormProperties`, defining a horizontal boundary of the scene. |
| 15 | 6 | ||
| 16 | The new member in `FormProperties` is defined as | 7 | The new member in `FormProperties` is defined as |
| 39 | - `halfWidth` is REQUIRED, and its value MUST be a `number`. It represents half the width of the rectangle, aligned with the $x$-axis at rotation 0. | 30 | - `halfWidth` is REQUIRED, and its value MUST be a `number`. It represents half the width of the rectangle, aligned with the $x$-axis at rotation 0. |
| 40 | - `halfLength` is REQUIRED, and its value MUST be a `number`. It represents half the length of the rectangle, aligned with the $y$-axis at rotation 0. | 31 | - `halfLength` is REQUIRED, and its value MUST be a `number`. It represents half the length of the rectangle, aligned with the $y$-axis at rotation 0. |
| 41 | 32 | ||
| 42 | ## 26.04.03 Tile Module | 33 | ## 26.04.02 Tile Module |
| 43 | 34 | ||
| 44 | The Tile module modifies the scene by introducing three new members in `FormProperties`, defining a tiled horizontal boundary of the scene. | 35 | The Tile module modifies the scene by introducing three new members in `FormProperties`, defining a tiled horizontal boundary of the scene. |
| 45 | 36 | ||
| 66 | 57 | ||
| 67 | When used with the Category module, the artifact that can be used as value of `tileModel` MUST use `tile` as its artifact category. | 58 | When used with the Category module, the artifact that can be used as value of `tileModel` MUST use `tile` as its artifact category. |
| 68 | 59 | ||
| 69 | ## 26.04.04 Horizontal Boundary of the Scene | 60 | ## 26.04.03 Horizontal Boundary of the Scene |
| 70 | 61 | ||
| 71 | A horizontal boundary of the scene is defined by a list of oriented rectangles, commonly referred to as oriented bounding boxes (OBBs), as defined in [[26.04-Boundary-Module-and-Tile-Module#26.02.02 Boundary Module]], lying on the ground plane. The union of the specified list of OBBs defines the inside of the scene, and any point that does not lie within this union is considered outside of the scene. The line where the outside and the inside of the scene meet is the scene boundary. | 62 | A horizontal boundary of the scene is defined by a list of oriented rectangles, commonly referred to as oriented bounding boxes (OBBs), as defined in [[26.04-Boundary-Module-and-Tile-Module#26.02.02 Boundary Module]], lying on the ground plane. The union of the specified list of OBBs defines the inside of the scene, and any point that does not lie within this union is considered outside of the scene. The line where the outside and the inside of the scene meet is the scene boundary. |
| 72 | 63 | ||