placeIn
Places this box inside the specified container box using anchor points to determine the relative positioning.
The placement is computed based on the anchor points specified for the container and the item being placed. By default, the anchor points are set to the center of the respective boxes. The dimensions of the placed box remain unchanged.
Return
A new Box representing this box placed inside the container at the calculated position.
Parameters
The box that will contain this box.
The anchor point on the container, defined as a Vector3 where each component ranges from 0.0 to 1.0. The default is the center of the container (0.5, 0.5, 0.5).
The anchor point on this box, defined as a Vector3 where each component ranges from 0.0 to 1.0. The default is the same as the anchor
parameter.
Positions the current rectangle (this
) within the given container
rectangle. The placement is determined by aligning the itemAnchor
of the current rectangle to the anchor
point within the container rectangle.
Return
A new rectangle representing the current rectangle positioned within the container.
Parameters
The rectangle within which the current rectangle will be positioned.
The relative position of the reference point within the container
rectangle. By default, it is set to (0.5, 0.5)
, which represents the center.
The relative position of the anchor point within the current rectangle. Defaults to the value of anchor
.