AxisAlignedBoundingBox.rotate

giant.ray_tracer.shapes.axis_aligned_bounding_box:

AxisAlignedBoundingBox.rotate(self, rotation)

This method is used to rotate the axis aligned bound box.

In actuality the box is not rotated because that would make it invalid, instead the inverse rotation is stored and used to rotate all rays that are traced against this box. This is done in _rotation.

Parameters:

rotation (Union[Rotation, ARRAY_LIKE]) – The rotation by which to rotate the bounding box. For valid inputs see the Rotation documentation.