aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Spear/Assets/Model/OBJ/OBJ_load.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Spear/Assets/Model/OBJ/OBJ_load.c b/Spear/Assets/Model/OBJ/OBJ_load.c
index 2474091..594ea0f 100644
--- a/Spear/Assets/Model/OBJ/OBJ_load.c
+++ b/Spear/Assets/Model/OBJ/OBJ_load.c
@@ -19,8 +19,6 @@ static void safe_free (void* ptr)
19} 19}
20 20
21 21
22// Cross product.
23// (0,1,0) x (1,0,0) = (0,0,-1).
24static void cross (vec3 a, vec3 b, vec3* c) 22static void cross (vec3 a, vec3 b, vec3* c)
25{ 23{
26 c->x = a.y * b.z - a.z * b.y; 24 c->x = a.y * b.z - a.z * b.y;
@@ -40,7 +38,7 @@ static void vec3_sub (vec3 a, vec3 b, vec3* out)
40static void compute_normal (char clockwise, vec3 p1, vec3 p2, vec3 p3, vec3* n) 38static void compute_normal (char clockwise, vec3 p1, vec3 p2, vec3 p3, vec3* n)
41{ 39{
42 vec3 v1, v2; 40 vec3 v1, v2;
43 if (clockwise) 41 if (!clockwise)
44 { 42 {
45 vec3_sub (p3, p2, &v1); 43 vec3_sub (p3, p2, &v1);
46 vec3_sub (p1, p2, &v2); 44 vec3_sub (p1, p2, &v2);