Package org.jwildfire.create.tina.meshgen.marchingcubes

Examples of org.jwildfire.create.tina.meshgen.marchingcubes.Mesh


      System.out.println("LOAD MESH: " + (t1 - t0) / 1000.0 + "s");
      System.out.println("  VERTICES: " + vertices.size());
      System.out.println("  NORMALS: " + vertexNormals.size());
      System.out.println("  FACES: " + faces.size());

      return new Mesh(vertices, vertexNormals.size() == vertices.size() && vertexNormals.size() > 0 ? vertexNormals : null, faces);
    }
    catch (Exception ex) {
      throw new RuntimeException(ex);
    }
View Full Code Here


      }
    }
    long t1 = System.currentTimeMillis();
    System.out.println("REDUCE MESH: " + (t1 - t0) / 1000.0 + "s");

    return new Mesh(points, faces);
  }
View Full Code Here

    RawFaces rawFaces = createFaces(sampler, threshold);
    if (forceAbort) {
      return null;
    }

    Mesh mesh = FacesMerger.generateMesh(rawFaces);
    if (forceAbort) {
      return null;
    }

    MeshWriter.saveMesh(mesh, outFilename);
View Full Code Here

    faces.add(new Face(1, 2, 5));
    faces.add(new Face(1, 5, 6));
    faces.add(new Face(5, 4, 7));
    faces.add(new Face(5, 7, 6));

    Mesh mesh = new Mesh(points, faces);

    SceneBuilder scene = new SceneBuilder();
    scene
        .openImage()
        .withAa(1, 1)
View Full Code Here

  private SimpleImage renderPreviewImage(int pWidth, int pHeight, boolean pFastPreview) {
    if (currPreviewMesh == null) {
      return new SimpleImage(pWidth, pHeight);
    }
    Mesh mesh = pFastPreview ? currPreviewMesh.getReducedMesh() : currPreviewMesh.getMesh();
    return MeshPreviewRenderer.renderMesh(mesh, pWidth, pHeight,
        previewPositionXREd.getDoubleValue(), previewPositionYREd.getDoubleValue(),
        previewSizeREd.getDoubleValue(), previewScaleZREd.getDoubleValue(),
        previewRotateAlphaREd.getDoubleValue(), previewRotateBetaREd.getDoubleValue());
  }
View Full Code Here

      errorHandler.handleError(ex);
    }
  }

  private void importPreviewMesh(String pFilename) {
    Mesh mesh = SimpleWavefrontObjLoader.readMesh(pFilename);
    currPreviewMesh = new MeshPair(mesh);
    refreshPreviewMeshInfo();
    enableControls();
    refreshPreview(false);
  }
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.meshgen.marchingcubes.Mesh

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.