Package jmt.engine.jaba.convexHull3d

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


        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


        }
        if (p.vertex.getID() >= 0 && hullVerticesSet.add(p)) {
          if (v.x() > max[0]) {
            max[0] = v.x();
          }
          if (v.y() > max[1]) {
            max[1] = v.y();
          }
          if (v.z() > max[2]) {
            max[2] = v.z();
          }
View Full Code Here

        if (p.vertex.getID() >= 0 && hullVerticesSet.add(p)) {
          if (v.x() > max[0]) {
            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]) {
View Full Code Here

            max[2] = v.z();
          }
          if (v.x() < min[0]) {
            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

          }
          if (v.x() < min[0]) {
            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

    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

    // 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

        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

        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());
        screenPos = prj.project(worldPos);
        PointData p3 = new PointData(worldPos, screenPos, v);

        drawFace(g, p1, p2, p3, f);
      }
View Full Code Here

    // Draw visible faces
    if (enableVisibleFaces) {
      for (int i = 0; i < visibleFacesArray.length; i++) {
        HullFace f = visibleFacesArray[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

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.