Example #1
0
 public String toString() {
   if (Vector4f.dot(normal(), v1.asVector()) > 0) {
     return "f " + b + " " + a + " " + c + " " + d;
   } else {
     return "f " + a + " " + b + " " + c + " " + d;
   }
 }
Example #2
0
 public static Vector2f transform(Matrix4f m, float x, float y) {
   tmpV.set(x, y);
   Matrix4f.transform(m, tmpV, tmpV);
   return new Vector2f(tmpV.x, tmpV.y);
 }
Example #3
0
 public Vector4f normal() {
   return Project.cross4(
       Vector4f.sub(v1.asVector(), v4.asVector(), null),
       Vector4f.sub(v2.asVector(), v4.asVector(), null),
       Vector4f.sub(v3.asVector(), v4.asVector(), null));
 }