BRL-CAD
Loading...
Searching...
No Matches
Separating Axis Theorem Tests
Collaboration diagram for Separating Axis Theorem Tests:

Functions

int bg_sat_line_aabb (const point_t origin, const vect_t ldir, const point_t aabb_center, const vect_t aabb_extent)
 Implementation of Separating Axis Theorem intersection tests.
 
int bg_sat_line_obb (const point_t origin, const vect_t ldir, const point_t obb_center, const vect_t obb_extent1, const vect_t obb_extent2, const vect_t obb_extent3)
 
int bg_sat_tri_aabb (const point_t v1, const point_t v2, const point_t v3, const point_t aabb_center, const vect_t aabb_extent)
 
int bg_sat_tri_obb (const point_t v1, const point_t v2, const point_t v3, const point_t obb_center, const vect_t obb_extent1, const vect_t obb_extent2, const vect_t obb_extent3)
 
int bg_sat_aabb_obb (const point_t aabb_min, const point_t aabb_max, const point_t obb_center, const vect_t obb_extent1, const vect_t obb_extent2, const vect_t obb_extent3)
 
int bg_sat_obb_obb (const point_t obb1_center, const vect_t obb1_extent1, const vect_t obb1_extent2, const vect_t obb1_extent3, const point_t obb2_center, const vect_t obb2_extent1, const vect_t obb2_extent2, const vect_t obb2_extent3)
 

Detailed Description

Function Documentation

◆ bg_sat_line_aabb()

int bg_sat_line_aabb ( const point_t  origin,
const vect_t  ldir,
const point_t  aabb_center,
const vect_t  aabb_extent 
)
extern

Implementation of Separating Axis Theorem intersection tests.

Test for an intersection between a line and an Axis-Aligned Bounding Box (AABB).

Returns 1 if they intersect, 0 otherwise.

◆ bg_sat_line_obb()

int bg_sat_line_obb ( const point_t  origin,
const vect_t  ldir,
const point_t  obb_center,
const vect_t  obb_extent1,
const vect_t  obb_extent2,
const vect_t  obb_extent3 
)
extern

Test for an intersection between a line and an Oriented Bounding Box (OBB).

Returns 1 if they intersect, 0 otherwise.

◆ bg_sat_tri_aabb()

int bg_sat_tri_aabb ( const point_t  v1,
const point_t  v2,
const point_t  v3,
const point_t  aabb_center,
const vect_t  aabb_extent 
)
extern

Test for an intersection between a triangle and an Axis-Aligned Bounding Box (AABB).

Returns 1 if they intersect, 0 otherwise.

◆ bg_sat_tri_obb()

int bg_sat_tri_obb ( const point_t  v1,
const point_t  v2,
const point_t  v3,
const point_t  obb_center,
const vect_t  obb_extent1,
const vect_t  obb_extent2,
const vect_t  obb_extent3 
)
extern

Test for an intersection between a triangle and an Oriented Bounding Box (OBB).

Returns 1 if they intersect, 0 otherwise.

◆ bg_sat_aabb_obb()

int bg_sat_aabb_obb ( const point_t  aabb_min,
const point_t  aabb_max,
const point_t  obb_center,
const vect_t  obb_extent1,
const vect_t  obb_extent2,
const vect_t  obb_extent3 
)
extern

Test for an intersection between an Axis-Aligned Bounding Box (AABB) and an Oriented Bounding Box (OBB). The latter is defined by a center point and three perpendicular vectors from the center to the centers of the various faces.

Returns 1 if they intersect, 0 otherwise.

◆ bg_sat_obb_obb()

int bg_sat_obb_obb ( const point_t  obb1_center,
const vect_t  obb1_extent1,
const vect_t  obb1_extent2,
const vect_t  obb1_extent3,
const point_t  obb2_center,
const vect_t  obb2_extent1,
const vect_t  obb2_extent2,
const vect_t  obb2_extent3 
)
extern

Test for an intersection between two Oriented Bounding Boxes (OBBs). The boxes are defined by a center point and three perpendicular vectors from the center to the centers of the various faces.

Returns 1 if they intersect, 0 otherwise.