searches the current version of every section · esc to close

Viewing this section as of v0.1.49 (tagged 2026-04-18). Go to current →

26.05.06 Slot Placement

Slot-placement places artifacts in a set of predefined slots.

26.05.06.01 Requirements of the Slot-placement

The Slot-placement introduces a new member in FormProperties to represent the slots allowing for placing artifacts. It is defined as

interface FormProperties {
	slotProfile: SlotProfile // OPTIONAL
	// ...
}

where slotProfile is OPTIONAL and MUST be of type SlotProfile. If slotProfile is not present, then slot-placement MUST NOT be performed regardless of layout mode. If layout mode is not slot layout mode, slotProfile SHOULD be ignored unless specified and used by other modules.

The input Form for slot-placement MUST have a slotProfile in its properties member.

The slot-placement introduces two new members in EmbeddingProperties to represent which slot the artifact is placed in. They are defined as

interface EmbeddingProperties {
	slotIndex: number // OPTIONAL
	slotOrientationIndex: number // OPTIONAL
	// ...
}

where

  • slotIndex is OPTIONAL and MUST be of type number and MUST be an integer.
  • slotOrientationIndex is OPTIONAL, and MUST be of type number and MUST be an integer.

The Embedding participating in slot-placement MUST have an EmbeddingProperties with member slotIndex. Embeddings not carrying it MUST NOT participate in slot-placement.

26.05.06.02 Define Slot and SlotProfile and Slot Type Object

A SlotProfile type object defines the slots available in the scene. It is defined as

interface SlotProfile {
  slots: Slot[] // REQUIRED
}

where

  • slots is REQUIRED and MUST be an array of Slot. Each Slot in the array MUST have a distinct slotIndex.

A Slot defines a slot in the scene. It MUST be representable as a JSON object, contain only JSON-serializable values, and contain the following data.

interface Slot {
	slotIndex: number // REQUIRED
	position: Coordinate // REQUIRED
	slotRotation: SlotRotation // OPTIONAL
}

where

  • slotIndex is REQUIRED, and its value MUST be of type number and MUST be an integer.
  • position is REQUIRED and it MUST be of type Coordinate.
  • slotRotation is OPTIONAL, and its value MUST be of type SlotRotation. When slotRotation is not provided, it indicates zero rotation on all axes.

A SlotRotation defines the possible rotations for the artifact.

interface SlotRotation {
	rotationStep: number // OPTIONAL
	rotationStepAxis: Coordinate // OPTIONAL
	eulerStep: Euler[] // OPTIONAL
}
  • rotationStep is OPTIONAL and its value MUST be of type number and MUST be an integer. rotationStep indicates the allowed rotations around rotationStepAxis by k360°N\frac{k\,360\degree}{N}, where NN is the integer specified by rotationStep and kk is an integer that can be specified via slotOrientationIndex in EmbeddingProperties. A rotationStep of zero indicates that smooth rotation is allowed and, in the Embedding, the rotation MUST be specified in rotation.
  • rotationStepAxis is OPTIONAL and its value MUST be of type Coordinate. It specifies the axis around which rotationStep rotations are applied. The magnitude of rotationStepAxis MUST be ignored; only its direction is used. If not provided, the default axis is the zz-axis, i.e., [0, 0, 1].
  • eulerStep is OPTIONAL and its value MUST be an array of type Euler. eulerStep indicates the allowed Euler rotations. In the Embedding, the choice can be specified in slotOrientationIndex by the index of an element in eulerStep, where the index starts from zero. An empty eulerStep array indicates that smooth Euler rotation is allowed and, in the Embedding, the rotation MUST be specified in rotation.

The default value for SlotRotation is {eulerStep: [[0, 0, 0]]}.

26.05.06.03 The Input and Result of the Slot-placement

The slot-placement takes an input layout from Form and produces a resulting layout in which each element, if it participates in the slot-placement, is placed in a slot.

For artifact ii, its original placement can be written as (xi,yi,zi)(x_i', y_i', z_i') before performing the slot-placement, where ii indexes artifacts in the input layout that participate in the slot-placement. The resulting placement can be written as (xi,yi,zi)(x_i, y_i, z_i) after performing the slot-placement.

For artifact ii, its original rotation can be written as the Euler angle (αi,βi,γi)(\alpha_i', \beta_i', \gamma_i') before performing the slot-placement, where ii indexes artifacts in the input layout that participate in the slot-placement. The resulting rotation can be written as (αi,βi,γi)(\alpha_i, \beta_i, \gamma_i) after performing the slot-placement.

The input (xi,yi,zi)(x_i', y_i', z_i') will not be used for slot-placement. (xi,yi,zi)(x_i, y_i, z_i) is completely determined by the SlotProfile.

26.05.06.04 Performing the Slot-placement

In this section, we illustrate how to place an artifact at a slot. To place an artifact ii, where ii indexes artifacts in the layout, is to derive its placement (xi,yi,zi)(x_i, y_i, z_i) and its rotation in the scene.

The process of placing at slots can be operated by the following steps. The placement (xi,yi,zi)(x_i, y_i, z_i) of the artifact ii in the scene MUST be reproducible by these steps, regardless of the implementation.

  1. Order to place. Process embeddings in the order they appear in the layout. Keep a set of “used slots.”
  2. Select the slot. Using the slotIndex in the Embedding, find the matching Slot in slotProfile.
    • If no matching Slot exists, do not place ii; continue with the next artifact from step 2.
    • If this slotIndex is already in the “used slots” set, do not place ii; continue with the next artifact from step 2.
    • Otherwise, add this slotIndex to the “used slots” set.
  3. Derive the position. Determine (xi,yi,zi)(x_i, y_i, z_i) from the selected Slot.
    • If position is provided, set (xi,yi,zi)(x_i, y_i, z_i) to position.
    • Otherwise, do not place ii; continue with the next artifact from step 2.

After iterating through the layout, each placed artifact ii has a determined placement (xi,yi,zi)(x_i, y_i, z_i). It is RECOMMENDED not to define slotProfile entries whose slots lie outside the scene.

The process of deriving the rotation of the placed artifact can be operated by the following steps. The rotation of the artifact ii in the scene MUST be reproducible by these steps, regardless of the implementation.

  1. Select the slot.
    Using the slotIndex in the Embedding, find the matching Slot in slotProfile.
    • If no matching Slot exists, do not place ii; continue with the next artifact from step 1.
    • Otherwise, proceed to step 2.
  2. No slotRotation specified.
    If the Slot has no slotRotation, the rotation of the artifact is zero on all axes.
  3. rotationStep is a non-zero integer NN.
    Allowed rotations are around the axis of rotationStepAxis only, from the set {k360°NkZ}\{\tfrac{k\,360\degree}{N}\mid k\in\mathbb{Z}\};
    1. If slotOrientationIndex is present and is an integer kk, set the rotation around rotationStepAxis to k360°N\tfrac{k\,360\degree}{N}.
    2. Else if rotation is present, round it to the nearest value in rotation around rotationStepAxis to k360°N\tfrac{k\,360\degree}{N}, where “nearest” is the shortest Euclidean distance after wrapping angles on the lattice with basis {360°x^,360°y^,360°z^}\{360\degree\,\hat x,360\degree\,\hat y,360\degree\,\hat z\}. If exactly between two options, select the one with larger kk.
    3. Else set the zz rotation to 0.
  4. rotationStep is zero. A smooth rotation around rotationStepAxis is allowed.
    • If rotation is present, use it.
    • Otherwise set the rotation around rotationStepAxis to 0.
  5. eulerStep is a non-empty array.
    Allowed rotations are the Euler triples listed in eulerStep.
    1. If slotOrientationIndex is present and is an integer, select the Euler triple at that index; if the index exceeds the array length, select the first element (index 0).
    2. Else if rotation is present, select the nearest Euler triple from eulerStep, where “nearest” is the shortest Euclidean distance after wrapping angles on the lattice with basis {360°x^,360°y^,360°z^}\{360\degree\,\hat x,360\degree\,\hat y,360\degree\,\hat z\}. If exactly between two options, select the one with the smaller array index.
    3. Else select the first element (index 0) of eulerStep.
  6. eulerStep is an empty array.
    A smooth Euler rotation is allowed.
    • If rotation is present, use it.
    • Otherwise the rotation is zero on each axis.