Package ca.eandb.jmist.math

Examples of ca.eandb.jmist.math.Vector3.plus()


      Face face = faces.get(i);
      for (int j = 0; j < face.normalIndices.length; j++) {
        int k = face.normalIndices[j];
        if (toGenerate.get(k)) {
          Vector3 normal = normals.get(k);
          normal = normal.plus(face.plane.normal());
          normals.set(k, normal);
        }
      }
    }
    for (int i = 0; i < n; i++) {
View Full Code Here


          Vector3 v0 = vertices.get(indices[indices.length - 1]).vectorFromOrigin();
          Vector3 v1;
          Vector3 r = Vector3.ZERO;
          for (int i = 0; i < indices.length; i++) {
            v1 = vertices.get(indices[i]).vectorFromOrigin();
            r = r.plus(v0.cross(v1));
            v0 = v1;
          }
          area = 0.5 * Math.abs(n.dot(r));
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.