From a149f96a766c4d8d63919535cc468c539036165e Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sun, 19 Jun 2011 18:29:27 -0400 Subject: reverse the face orientation on all triangles in the stl files exported from sketchup. --- src/intersect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/intersect.h') diff --git a/src/intersect.h b/src/intersect.h index bfde782..0b713c8 100644 --- a/src/intersect.h +++ b/src/intersect.h @@ -60,7 +60,7 @@ __device__ bool intersect_triangle(const float3 &origin, const float3 &direction `direction` must be normalized. */ __device__ int get_color(const float3 &direction, const float3 &v0, const float3& v1, const float3 &v2, const int base_color=0xFFFFFFFF) { - float scale = dot(normalize(cross(v1-v0,v2-v0)),-direction); + float scale = dot(normalize(cross(v1-v0,v2-v1)),-direction); unsigned int r = 0xFF & (base_color >> 16); unsigned int g = 0xFF & (base_color >> 8); -- cgit