Package artofillusion.object

Examples of artofillusion.object.TriangleMesh.duplicate()


    ComponentsDialog dlg = new ComponentsDialog(this, Translate.text("simplifyMeshTitle"),
            new Widget[] {errorField}, new String[] {Translate.text("maxSurfaceError")});
    if (!dlg.clickedOk())
      return;
    setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));

    // If we are not in Edge selection mode, convert the selection to edges.

    if (selectMode == POINT_MODE)
    {
View Full Code Here


    BStandardDialog dlg = new BStandardDialog("", UIUtilities.breakString(Translate.text("optimizeMeshTitle")), BStandardDialog.QUESTION);
    String options[] = new String [] {Translate.text("button.ok"), Translate.text("button.cancel")};
    if (dlg.showOptionDialog(this, options, options[0]) == 1)
      return;
    TriangleMesh theMesh = (TriangleMesh) objInfo.getObject();
    setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));
    theMesh.copyObject(TriangleMesh.optimizeMesh(theMesh));
    setMesh(theMesh);
    for (int i = 0; i < selected.length; i++)
      selected[i] = false;
    setSelection(selected);
View Full Code Here

          new String [] {Translate.text("extrudeHeight"), Translate.text("bevelWidth"), ""});
    if (!dlg.clickedOk())
      return;
    double height = heightField.getValue();
    double width = widthField.getValue();
    setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));

    // Generate the new mesh.
   
    TriMeshBeveler beveler = new TriMeshBeveler(theMesh, selected, bevelMode[applyChoice.getSelectedIndex()]);
    theMesh.copyObject(beveler.bevelMesh(height, width));
View Full Code Here

  }

  public void reverseNormalsCommand()
  {
    TriangleMesh theMesh = (TriangleMesh) objInfo.getObject();
    setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));
    theMesh.reverseNormals();
    objectChanged();
    updateImage();
  }
View Full Code Here

  void setSmoothingMethod(int method)
  {
    TriangleMesh theMesh = (TriangleMesh) objInfo.getObject();

    setUndoRecord(new UndoRecord(this, false, UndoRecord.COPY_OBJECT, new Object [] {theMesh, theMesh.duplicate()}));
    for (int i = 0; i < smoothItem.length; i++)
      smoothItem[i].setState(false);
    smoothItem[method].setState(true);
    theMesh.setSmoothingMethod(method);
    objectChanged();
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.