place
Places a given box relative to this box using specified anchor points. This method computes the position of the placed box based on the anchor points of both the current box and the given box. The resulting box maintains the dimensions of the given box and is positioned at the calculated location.
Return
A new Box representing the placed item with adjusted position and the same dimensions as the input item box.
Parameters
The box to be placed relative to this box.
The anchor point on this box, specified as a Vector3 where each component ranges from 0.0 to 1.0. The default is the center of this box (0.5, 0.5, 0.5).
The anchor point on the item being placed, specified as a Vector3 where each component ranges from 0.0 to 1.0. The default is the same as the anchor
parameter.
Places a given rectangle (item
) within the bounds of the current rectangle (this
), positioning it based on the specified anchor point.
Return
A new rectangle representing the positioned item
within the current rectangle.
Parameters
The rectangle to be placed within the current rectangle.
The relative position of the anchor point within the bounds of the current rectangle. Defaults to (0.5, 0.5)
which centers the item within the current rectangle.