/// Generic bounding box for D-dimensional space.
/// Calculates the ID for a bounding box wall based on the axis and direction.
///
/// The IDs start at -1 and decrease.
/// - Axis 0 (X) Min: -1
/// - Axis 0 (X) Max: -2
/// - Axis 1 (Y) Min: -3
/// - Axis 1 (Y) Max: -4