Package jmt.engine.graphic

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


  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 {
      return true;
    }
  }
View Full Code Here


    if (enableDebugInfo) {
      // Draw normals
      Vector4 wc = new Vector4();
      wc.x(p1.worldPos.x() + p2.worldPos.x() + p3.worldPos.x());
      wc.y(p1.worldPos.y() + p2.worldPos.y() + p3.worldPos.y());
      wc.z(p1.worldPos.z() + p2.worldPos.z() + p3.worldPos.z());
      wc.w(1.0f);
      wc.multSelf(1.0f / 3.0f);
      Vector4 pc = prj.project(wc);
      Vector4 pn = prj.project(wc.add(face.getNormal()));
      g.setColor(Color.BLUE);
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.