BRL-CAD
Loading...
Searching...
No Matches
Triangle/Ray Intersection Tests
Collaboration diagram for Triangle/Ray Intersection Tests:

Functions

int bg_isect_tri_line (point_t *isect, const point_t orig, const vect_t dir, const point_t vert0, const point_t vert1, const point_t vert2)
 Triangle ray and line intersection tests.
 
int bg_isect_tri_ray (const point_t orig, const point_t dir, const point_t vert0, const point_t vert1, const point_t vert2, point_t *isect)
 Test whether a forward ray intersects a triangle.
 

Detailed Description

Function Documentation

◆ bg_isect_tri_line()

int bg_isect_tri_line ( point_t isect,
const point_t  orig,
const vect_t  dir,
const point_t  vert0,
const point_t  vert1,
const point_t  vert2 
)
extern

Triangle ray and line intersection tests.

Test whether an infinite line intersects a triangle.

The line is orig + t * dir for all real t. The direction must be nonzero. If isect is non-NULL, it is written only when an intersection is found.

◆ bg_isect_tri_ray()

int bg_isect_tri_ray ( const point_t  orig,
const point_t  dir,
const point_t  vert0,
const point_t  vert1,
const point_t  vert2,
point_t isect 
)
extern

Test whether a forward ray intersects a triangle.

The ray is orig + t * dir for t >= 0. The direction must be nonzero. If isect is non-NULL, it is written only when an intersection is found.