Package jmt.engine.graphic

Examples of jmt.engine.graphic.Vector4.subSelf()


  public void updateNormal() {
    Vector4 vv0 = Vector4.createPoint3D(v0.x(), v0.y(), v0.z());
    Vector4 vv1 = Vector4.createPoint3D(v1.x(), v1.y(), v1.z());
    Vector4 vv2 = Vector4.createPoint3D(v2.x(), v2.y(), v2.z());
    vv1.subSelf(vv0);
    vv2.subSelf(vv0);
    vv1.crossSelf(vv2);
    normal = vv1;
    normal.normalize();
  }
View Full Code Here


      return 0;
  }

  public boolean isCoplanar(HullFace face) {
    Vector4 diff = this.normal.clone();
    diff.subSelf(face.normal);
    if (Math.abs(diff.x()) > COPLANAR_EPSILON
        || Math.abs(diff.y()) > COPLANAR_EPSILON
        || Math.abs(diff.z()) > COPLANAR_EPSILON) {
      return false;
    } else {
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.