Jelajahi Sumber

-updated distancePointPlane

Anton Rohr 11 tahun lalu
induk
melakukan
8259b58200
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  1. 3 1
      bbiwarg/Utility/Vector.cs

+ 3 - 1
bbiwarg/Utility/Vector.cs

@@ -220,13 +220,15 @@ namespace bbiwarg.Utility
         }
         public static float distancePointPlane(Vector<T> point, Vector<T> planeA, Vector<T> planeB, Vector<T> planeC)
         {
-
+            //TODO - Diese funktion funktioniert nur mit T = float, 
+            //die normalisierte Normale einer Ebene macht nur mit floats sinn (werte zwischen 0 und 1)
             if (point.length() != 3 || planeA.length() != 3 || planeB.length() != 3 || planeC.length() != 3)
                 throw new ArgumentException("The vectors' length should be 3");
 
             Vector<T> ab = planeB - planeA;
             Vector<T> ac = planeC - planeA;
             Vector<T> normal = crossProduct(ab, ac).normalize();
+            
 
             Vector<T> temp = point - planeA;
             temp = pointwiseMultiply(temp, normal);