logo

prolebra_StickyStuff_MeshWalking_Mesh

class Mesh {
  TriangleMesh m;
  TriangleMesh md;

  Mesh(String mesh, String displayMesh) {
    m = (TriangleMesh) new STLReader().loadBinary(sketchPath(mesh), STLReader.TRIANGLEMESH);
    m.computeVertexNormals();
    md = (TriangleMesh) new STLReader().loadBinary(sketchPath(displayMesh), STLReader.TRIANGLEMESH);
    md.computeVertexNormals();
  }
  void render() {
    pushStyle();
    stroke(50, 100);
    strokeWeight(1);
    fill(100, 255);
    gfx.mesh(md);
    popStyle();
  }
}
  • Share