use of maspack.geometry.NURBSMesh in project artisynth_core by artisynth.
the class NURBSViewer method addNURBSWithMesh.
public void addNURBSWithMesh(NURBSObject nurbs) {
addNURBS(nurbs);
if (nurbs instanceof NURBSSurface) {
NURBSMesh mesh = new NURBSMesh();
mesh.set((NURBSSurface) nurbs, /* triangular= */
true);
// mesh.setRenderEdges (true);
Color gold = new Color(0.93f, 0.8f, 0.063f);
RenderProps.setFaceColor(mesh, gold);
meshTable.put(nurbs, mesh);
System.out.println("mesh.numVerts=" + mesh.numVertices());
viewer.addRenderable(mesh);
}
}
Aggregations