Skip to content

Commit f856161

Browse files
Update tiny_obj_loader.h (tinyobjloader#346)
Fix wrong axis selected in Newell's method
1 parent 764cf75 commit f856161

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tiny_obj_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ static bool exportGroupsToShape(shape_t *shape, const PrimGroup &prim_group,
15971597
TinyObjPoint a(point1.x - point2.x, point1.y - point2.y, point1.z - point2.z);
15981598
TinyObjPoint b(point1.x + point2.x, point1.y + point2.y, point1.z + point2.z);
15991599

1600-
n.x += (a.x * b.z);
1600+
n.x += (a.y * b.z);
16011601
n.y += (a.z * b.x);
16021602
n.z += (a.x * b.y);
16031603
}

0 commit comments

Comments
 (0)