min_max_to_bounding_box

giant.ray_tracer.shapes.axis_aligned_bounding_box:

giant.ray_tracer.shapes.axis_aligned_bounding_box.min_max_to_bounding_box(min_sides, max_sides)

This function provides a python interface to the internal c function.

It determines the vertices of the bounding box given the min/max values for each axis.

The vertices are returned as an array of shape 3x6 where each column represents a new vertex. column 0 is the origin (min) of the AABB, column 1 is +x, column 2 is +y, column 3 is +z, column 4 is +xy, column 5 is +yz, column 6 is +xz, and column 7 is +xyz.

These will be returned in the un-rotated frame of the bounding box. To get the vertices in the current frame see AxisAlignedBoundingBox.vertices.

Parameters:
  • min_sides (np.ndarray) – the minimum sides of the bounding box as a length 3 array

  • max_sides (np.ndarray) – the maximum sides of the bounding box as a length 3 array

Returns:

a 3x8 array of the vertices of the bounding box in the translated but not rotated frame. The data type will always be double precision

Return type:

np.ndarray