6 Module AABB3D
gullradriel edited this page 2026-10-29 20:54:40 +01:00

AABB3D: simple space area management API

Structures

Name
struct AABB3D
Axis-Aligned Bounding Box (AABB) algorithm.

Types

Name
typedef double AABB_VALUE
type of a AABB component

Functions

Name
bool isPointInsideAABB3D(AABB3D box, AABB_VALUE x, AABB_VALUE y, AABB_VALUE z)
check if a point is inside a 3D AABB
bool doAABB3DsIntersect(AABB3D box1, AABB3D box2)
check if two 3D AABBs intersect
AABB3D createAABB3D(AABB_VALUE xMin, AABB_VALUE yMin, AABB_VALUE zMin, AABB_VALUE xMax, AABB_VALUE yMax, AABB_VALUE zMax)
create a 3D AABB

Types Documentation

typedef AABB_VALUE

typedef double AABB_VALUE;

type of a AABB component

Functions Documentation

function isPointInsideAABB3D

bool isPointInsideAABB3D(
    AABB3D box,
    AABB_VALUE x,
    AABB_VALUE y,
    AABB_VALUE z
)

check if a point is inside a 3D AABB

Parameters:

  • box the box to use
  • x x coordinate of the point to test
  • y y coordinate of the point to test
  • z z coordinate of the point to test

Return: 0 or 1

function doAABB3DsIntersect

bool doAABB3DsIntersect(
    AABB3D box1,
    AABB3D box2
)

check if two 3D AABBs intersect

Parameters:

  • box1 the first box
  • box2 the second box

Return: 0 or 1

function createAABB3D

AABB3D createAABB3D(
    AABB_VALUE xMin,
    AABB_VALUE yMin,
    AABB_VALUE zMin,
    AABB_VALUE xMax,
    AABB_VALUE yMax,
    AABB_VALUE zMax
)

create a 3D AABB

Parameters:

  • xMin minimum x value for the box
  • yMin minimum y value for the box
  • zMin minimum z value for the box
  • xMax maximum x value for the box
  • yMax maximum y value for the box
  • zMax maximum z value for the box

Return: a new AABB3D box

create a new AABB3D box

create a 3D AABB