26.04 Boundary Module and Tile Module
26.04.01 Coordinate2D and Euler2D Types
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
type Coordinate2D = [number, number]
type Euler2D = number
where Coordinate2D represents the coordinate , in that order, and a positive Euler2D value means counterclockwise rotation.
26.04.02 Boundary Module
The Boundary module modifies the scene by introducing a new member in FormProperties, defining a horizontal boundary of the scene.
The new member in FormProperties is defined as
interface FormProperties {
boundary: OBB[] // OPTIONAL
// ...
}
where
boundaryis OPTIONAL, and its value MUST be an array ofOBBtype objects.
An OBB type object represents an oriented rectangle on the ground plane, defined by its center, its rotation about the center, and its halfWidth and halfLength. The OBB type is defined as
interface OBB {
center: Coordinate2D // REQUIRED
rotation: Euler2D // REQUIRED
halfWidth: number // REQUIRED
halfLength: number // REQUIRED
}
where
centeris REQUIRED, and its value MUST be of typeCoordinate2D. It represents the center of the oriented rectangle on the ground plane.rotationis REQUIRED, and its value MUST be of typeEuler2D. It represents the rotation of the rectangle about its center.halfWidthis REQUIRED, and its value MUST be anumber. It represents half the width of the rectangle, aligned with the -axis at rotation 0.halfLengthis REQUIRED, and its value MUST be anumber. It represents half the length of the rectangle, aligned with the -axis at rotation 0.
26.04.03 Tile Module
The Tile module modifies the scene by introducing three new members in FormProperties, defining a tiled horizontal boundary of the scene.
The new members in FormProperties are defined as
interface FormProperties {
tileList: Coordinate2D[] // OPTIONAL
tileModel: Artifact // OPTIONAL
tileVisible: boolean // OPTIONAL
// ...
}
where
tileListis OPTIONAL, and its value MUST be an array ofCoordinate2D. It represents a tiled horizontal boundary of the scene as an array of positions of square tiles on the ground plane.tileModelis OPTIONAL, and its value MUST be of typeArtifact. It represents the visual representation of each tile in the scene. Its value MUST be ignored iftileListis not specified, or iftileVisibleisfalse, or both.tileVisibleis OPTIONAL, and its value MUST be of typeboolean. It represents the visibility toggle of the tile model. If it is not provided, the default valuetrueMUST be used. Its value MUST be ignored iftileListis not specified.
When tileVisible is true and tileModel is specified, the implementation MUST place tileModel at each position on the ground plane specified by tileList with zero rotation as the visual representation of each tile. When working with the Layout Mode module, the placed tileModel MUST NOT affect the reconstruction logic of the scene and MUST NOT appear in the layout data.
When tileVisible is true and tileModel is not specified, the implementation MAY use its own Artifact as tileModel for the visual representation of the tile. It is RECOMMENDED to use a mid-tone gray plane with dimensions 1 by 1 as the default visual representation of each tile.
When tileVisible is false, there MUST NOT be any visual representation of the tile and the value of tileModel MUST be ignored.
When used with the Category module, the artifact that can be used as value of tileModel MUST use tile as its artifact category.
26.04.04 Horizontal Boundary of the Scene
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.
For general artifacts, the ground plane placement, i.e., the projection of its placement onto the ground plane, MUST NOT lie outside of the scene. This means its placement may lie on the scene boundary by the definition of outside of the scene. Any artifact whose placement lies outside of the scene MUST be removed during reconstruction of the scene.
When working with the Layout Mode module, for artifacts participating in stacking logic, no point of such an artifact's footprint MUST lie outside of the scene. That is, such artifacts in layout MUST be removed before the stacking logic is applied.
When the Boundary module, the Tile module, or both are used, the boundary can be specified by the boundary member, the tileList member, or both, in FormProperties. When the boundary is specified by boundary, its value directly gives the OBBs of the boundary. When the boundary is specified by tileList, it is equivalent to a list of OBBs with zero rotation and width and length of 1, i.e., halfWidth and halfLength of 0.5, centered at each element of tileList. When both boundary and tileList are specified, the boundary is their intersection.
When neither boundary nor tileList is specified, or both modules are not supported by the implementation, there is no boundary for the scene and every point in the scene is considered to lie within the boundary.
One MUST NOT confuse the case where these data are specified as empty lists, which indicates that every point lies outside of the boundary, with the case where these data are not specified, which indicates that there is no boundary and every point in the scene lies within the boundary.
Please note that this boundary is the boundary of the scene, not the boundary for avatar movement. For the boundary of avatar movement, please see TODO.