medfall

A super great game engine
Log | Files | Refs

commit ac2727f3fc9b64f4f3ce9799e1ea60c72f96f002
parent dc0803f0cc4496fbc79d149a10cbd4b7f99fdc03
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Mon Jul 24 23:32:55 +0300

Make ray_vs_triangle be ray/triangle and not line/triangle intersection

Diffstat:
heightmap.cc | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/heightmap.cc b/heightmap.cc @@ -180,7 +180,7 @@ bool ray_vs_triangle( v3 ray_origin, v3 ray_dir, v3 p0, v3 p1, v3 p2, float * t if( v < 0 || u + v > 1 ) return false; *t = dot( e02, q ) * inv_det; - return true; + return *t >= 0; } static size_t child_idx( size_t node_idx, size_t quadrant ) {