Examples of Z()


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

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

    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

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

        if (hullEdgesSet.add(e)) {
        }
      }
      for (int j = 0; j < vertices.length; j++) {
        HullVertex v = vertices[j];
        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        PointData p = new PointData(worldPos, screenPos, v);
        if (isVisible) {
          visibleVerticesSet.add(p);
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

            max[0] = v.x();
          }
          if (v.y() > max[1]) {
            max[1] = v.y();
          }
          if (v.z() > max[2]) {
            max[2] = v.z();
          }
          if (v.x() < min[0]) {
            min[0] = v.x();
          }
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

          }
          if (v.y() > max[1]) {
            max[1] = v.y();
          }
          if (v.z() > max[2]) {
            max[2] = v.z();
          }
          if (v.x() < min[0]) {
            min[0] = v.x();
          }
          if (v.y() < min[1]) {
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

            min[0] = v.x();
          }
          if (v.y() < min[1]) {
            min[1] = v.y();
          }
          if (v.z() < min[2]) {
            min[2] = v.z();
          }
        }
      }
    }
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

          }
          if (v.y() < min[1]) {
            min[1] = v.y();
          }
          if (v.z() < min[2]) {
            min[2] = v.z();
          }
        }
      }
    }
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

    for (int i = 0; i < allVerticesArray.length; i++) {
      HullVertex v = allVerticesArray[i];
      PointData p = new PointData(null, null, v); // Dummy PointData, just
                            // to check the HashSet
      if (!hullVerticesSet.contains(p)) {
        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        p = new PointData(worldPos, screenPos, v);
        verticesInsideSet.add(p);
      }
    }
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

    // Draw hidden faces
    if (enableHiddenFaces) {
      for (int i = 0; i < hiddenFacesArray.length; i++) {
        HullFace f = hiddenFacesArray[i];
        HullVertex v = f.getVertex(0);
        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        PointData p1 = new PointData(worldPos, screenPos, v);

        v = f.getVertex(1);
        worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
View Full Code Here

Examples of jmt.engine.jaba.convexHull3d.HullVertex.z()

        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        PointData p1 = new PointData(worldPos, screenPos, v);

        v = f.getVertex(1);
        worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        screenPos = prj.project(worldPos);
        PointData p2 = new PointData(worldPos, screenPos, v);

        v = f.getVertex(2);
        worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
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.