Contents

planarOverlapping(layout:animationDuration:)

Use the overlapping layout to provide 2d poses for the immediate children and let TabletopKit determine their height and pitch/roll.

Declaration

static func planarOverlapping(layout: [EquipmentPose2D], animationDuration: Double? = nil) -> Self

Parameters

  • layout:

    An array of id and 2d pose for each child.

  • animationDuration:

    The duration of the transition between the current pose and the new pose. If zero or less than zero the new pose will be applied instantly. If not specified a default duration will be used.

Discussion

The height of the children is calculated by going over each equipment in the layout in the provided order and moving it to the lowest possible position so that it touches either the table, the previous sibling or both. The equipment retains its position on xz but it can be pitched and or rolled to allow touching both the previous sibling and the table.

If the layout contains poses for equipment that are not immediate children, those poses will be ignored. If the pose of some immediate children is not provided, the pose in their EquipmentState is used instead.

See Also

Laying out equipment