*Axis-aligned bounding cube in 3D space*

#include <adas/adas_defs.h>

typedef struct adas_cube_t { union { struct { union { struct { double x; double y; double z; }; adas_position_3d_t position; }; union { struct { double width; double height; double depth; }; adas_dimensions_3d_t dimensions; }; }; adas_rect_t top_rect; struct { double padding; adas_rect_t front_rect; }; }; } adas_cube_t;

- union
- A union with one of the following members:
- struct
- A struct that stores the position and dimensions of a cube.
The struct has these members:
- union
- A union that stores the position of a cube in one of two formats:
- struct
- A struct that contains the X, Y, Z positions of a cube:
- double
`x` - Position on the X axis.
- double
`y` - Position on the Y axis.
- double
`z` - Position on the Z axis.

- double
- adas_position_3d_t
`position` - 3D position of the cube (see adas_position_3d_t).

- union
- A union that stores the dimensions of a cube in one of two formats:
- struct
- A struct that contains the 3D dimensions of a cube:
- double
`width` - Width of the cube.
- double
`height` - Height of the cube.
- double
`depth` - Depth of the cube.

- double
- adas_dimensions_3d_t
`dimensions` - 3D dimensions of the cube (see adas_dimensions_3d_t).

- adas_rect_t
`top_rect` - 2D rectangle of the top of the cube (see adas_rect_t).
- struct
- A struct that contains the 2D dimensions of the front of the cube.
- double
`padding` - For internal use only; do not use.
- adas_rect_t
`front_rect` - 2D rectangle of the front of the cube (see adas_rect_t).

- double

The values that define the position and dimensions of the cube can be normalized values, in millimeters or pixels from the source coordinate space, depending on usage.