Package jmt.engine.jaba.convexHull3d

Examples of jmt.engine.jaba.convexHull3d.HullEdge


      }
      face.setShade(facing);

      // Create unique and visibility sets
      for (int j = 0; j < edges.length; j++) {
        HullEdge e = edges[j];
        if (isVisible) {
          visibleEdgesSet.add(e);

          // Fix edges flagged as hidden but actually visible
          if (hiddenEdgesSet.contains(e)) {
View Full Code Here


    // Increment the counter and set as marked
    face.setNumCoplanarVertices(1 + face.getNumCoplanarVertices());
    face.setMarked(true);

    for (int ei = 0; ei < 3; ei++) {
      HullEdge e = face.getEdge(ei);
      for (int ai = 0; ai < 2; ai++) {
        HullFace adj = e.getFace(ai);
        /*
         * if ( face.volumeSign( adj.getVertex( 0 ) ) == 0 &&
         * face.volumeSign( adj.getVertex( 1 ) ) == 0 &&
         * face.volumeSign( adj.getVertex( 2 ) ) == 0 &&
         * !face.isMarked() ) { incrementFaceCounter( adj ); }
View Full Code Here

    }

    // Draw hidden edges
    if (enableHiddenEdges) {
      for (int i = 0; i < hiddenEdgesArray.length; i++) {
        HullEdge e = hiddenEdgesArray[i];
        HullVertex v = e.getEndPoint(0);
        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        PointData p1 = new PointData(worldPos, screenPos, v);

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

        drawEdge(g, p1, p2, e, false);
      }
    }

    // Draw hidden hull vertices
    for (int i = 0; i < sortedHiddenVertices.length; i++) {
      PointData p = sortedHiddenVertices[i];
      if (p.vertex.getID() >= 0) {
        drawVertex(g, p, false, true);
      }
    }

    // Draws points inside
    for (int i = 0; i < sortedVerticesInside.length; i++) {
      PointData p = sortedVerticesInside[i];
      if (enableInternalVertices || p.vertex.getName().equals(selectedStation) ) {
        drawVertex(g, p, false, false);
      }
    }
   

    drawAxes(g, true);

    // Draw visible hull edges
    if (enableVisibleEdges) {
      for (int i = 0; i < visibleEdgesArray.length; i++) {
        HullEdge e = visibleEdgesArray[i];
        HullVertex v = e.getEndPoint(0);
        Vector4 worldPos = Vector4.createPoint3D(v.x(), v.y(), v.z());
        Vector4 screenPos = prj.project(worldPos);
        PointData p1 = new PointData(worldPos, screenPos, v);

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

        drawEdge(g, p1, p2, e, true);
View Full Code Here

TOP

Related Classes of jmt.engine.jaba.convexHull3d.HullEdge

Copyright © 2018 www.massapicom. 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.