ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Revision:
13:f4de03202477
Parent:
12:b69657862610
Child:
14:885915260e25
diff -r b69657862610 -r f4de03202477 Rasturizer/Rasturizer.cpp
--- a/Rasturizer/Rasturizer.cpp	Sun Mar 24 16:59:48 2019 +0000
+++ b/Rasturizer/Rasturizer.cpp	Sun Mar 24 17:53:25 2019 +0000
@@ -40,7 +40,7 @@
     }
     
     
-    if (points[0][2] > 20 || points[1][2] > 20 || points[2][2] > 20|| points[3][2] > 20){
+    if ((points[0][2] > 20 || points[1][2] > 20 || points[2][2] > 20|| points[3][2] > 20) && face.getVisible()){
         
         int diffX1 = points[0][0]*(40/points[0][2])-(points[1][0]*(40/points[1][2]));
         int diffY1 = points[0][1]*(40/points[0][2])-(points[1][1]*(40/points[1][2]));
@@ -58,6 +58,8 @@
              rint((points[3][0])*(40/points[3][2])+s)+42, 
              rint((points[3][1])*(40/points[3][2])+step*s)+21, 0);
         }
+    }
+    if((points[0][2] > 10 || points[1][2] > 10 || points[2][2] > 10|| points[3][2] > 10)){
         
         for (int i = 0; i < 3; i++){