artofillusion
Class TriMeshEditorWindow

java.lang.Object
  extended by BFrame
      extended by artofillusion.ObjectEditorWindow
          extended by artofillusion.MeshEditorWindow
              extended by artofillusion.TriMeshEditorWindow
All Implemented Interfaces:
EditingWindow, MeshEditController

public class TriMeshEditorWindow
extends MeshEditorWindow
implements EditingWindow

The TriMeshEditorWindow class represents the window for editing TriangleMesh objects.


Field Summary
 
Fields inherited from interface artofillusion.ui.MeshEditController
EDGE_MODE, FACE_MODE, POINT_MODE
 
Constructor Summary
TriMeshEditorWindow(EditingWindow parent, java.lang.String title, ObjectInfo obj, java.lang.Runnable onClose, boolean allowTopology)
           
 
Method Summary
 void adjustDeltas(Vec3[] delta)
          Given a list of deltas which will be added to the selected vertices, calculate the corresponding deltas for the unselected vertices according to the mesh tension.
 void bevelCommand()
           
 void bindSkeletonCommand()
          This is overridden to update jointWeightParam after weights are changed.
 void closeBoundaryCommand()
           
 void deleteCommand()
          Delete the selected points, edges, or faces from the mesh.
 void extendSelectionCommand()
          Extend the selection outward by one edge.
 void extractCurveCommand()
           
 void extractFacesCommand()
           
 TextureParameter getFaceIndexParameter()
          Get the extra texture parameter which was added to the mesh to keep track of face indices in the editor.
 boolean[] getHiddenFaces()
          Get which faces are hidden.
 TextureParameter getJointWeightParam()
          Get the extra texture parameter which was added to the mesh to keep track of joint weighting.
 ObjectInfo getObject()
          Get the object being edited in this window.
 boolean getProjectOntoSurface()
          Get whether the control mesh is displayed projected onto the surface.
 boolean[] getSelection()
          Get an array of flags telling which parts of the mesh are currently selected.
 int[] getSelectionDistance()
          Get the distance of each vertex from a selected vertex.
 int getSelectionMode()
          Get the current selection mode.
 void hideSelectionCommand()
          Hide the selected part of the mesh.
 void invertSelectionCommand()
          Invert the current selection.
 boolean isEdgeHidden(int which)
          Determine whether a particular edge is hidden to simulate a quad.
 boolean isQuadMode()
          Determine whether the mesh is being displayed as quads.
 boolean isTolerant()
          Determine whether we are in tolerant selection mode.
 void joinBoundariesCommand()
           
 void objectChanged()
          When the object changes, we need to rebuild the quad display.
 void optimizeCommand()
           
 void removeExtraParameters()
          Remove the extra texture parameters from the mesh which were used for keeping track of face and vertex indices.
 void reverseNormalsCommand()
           
 void selectAllCommand()
          Select the entire mesh.
 void selectEdgeLoopCommand()
          Select an edge loop from every edge which is currently selected.
 void selectEdgeStripCommand()
          Select an edge strip from every edge which is currently selected.
 void selectObjectBoundaryCommand()
          Select the edges which form the boundary of the mesh.
 void selectSelectionBoundaryCommand()
          Select the edges which form the boundary of the current selection.
 void setHiddenFaces(boolean[] hidden)
          Set which faces are hidden.
 void setMesh(Mesh mesh)
          Set the Mesh object for this viewer.
 void setObject(Object3D obj)
          Set the object being edited in this window.
 void setPointsCommand()
          This is overridden to update jointWeightParam after weights are changed.
 void setProjectOntoSurface(boolean project)
          Set whether the control mesh is displayed projected onto the surface.
 void setQuadMode(boolean quads)
          Set whether to display the mesh as quads.
 void setSelection(boolean[] sel)
          Set an array of flags specifying which parts of the mesh are selected.
 void setSelectionMode(int mode)
          When the selection mode changes, do our best to convert the old selection to the new mode.
 void setSmoothnessCommand()
           
 void setTolerant(boolean tol)
          Set whether to use tolerant selection mode.
 void setTool(EditingTool tool)
          Set the currently selected EditingTool.
 void showAllCommand()
          Show all faces of the mesh.
 void simplifyCommand()
           
 void subdivideCommand()
          Subdivide selected edges or faces of the mesh.
 void unbindSkeletonCommand()
          This is overridden to update jointWeightParam after weights are changed.
 void updateImage()
          Update the image displayed in this window.
 void updateMenus()
          Update which menus are enabled.
 
Methods inherited from class artofillusion.MeshEditorWindow
centerCommand, deleteJointCommand, dispose, editJointCommand, getMeshTension, getScene, getTensionDistance, isExtraParameter, isFreehand, randomizeCommand, redoCommand, renderPreviewCommand, setFreehand, setJointParentCommand, setParametersCommand, setTensionCommand, transformPointsCommand, undoCommand
 
Methods inherited from class artofillusion.ObjectEditorWindow
confirmClose, getAllViews, getFrame, getToolPalette, getView, setCurrentView, setGridCommand, setHelpText, setModified, setTemplateCommand, setUndoRecord, setVisible, showAxesCommand, showTemplateCommand, toggleViewsCommand
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artofillusion.ui.EditingWindow
confirmClose, getAllViews, getFrame, getScene, getToolPalette, getView, setHelpText, setModified, setUndoRecord
 

Constructor Detail

TriMeshEditorWindow

public TriMeshEditorWindow(EditingWindow parent,
                           java.lang.String title,
                           ObjectInfo obj,
                           java.lang.Runnable onClose,
                           boolean allowTopology)
Method Detail

getObject

public ObjectInfo getObject()
Get the object being edited in this window.

Specified by:
getObject in interface MeshEditController

setObject

public void setObject(Object3D obj)
Set the object being edited in this window.


setMesh

public void setMesh(Mesh mesh)
Description copied from class: MeshEditorWindow
Set the Mesh object for this viewer.

Specified by:
setMesh in interface MeshEditController
Specified by:
setMesh in class MeshEditorWindow

objectChanged

public void objectChanged()
When the object changes, we need to rebuild the quad display.

Specified by:
objectChanged in interface MeshEditController
Overrides:
objectChanged in class MeshEditorWindow

setTool

public void setTool(EditingTool tool)
Description copied from interface: EditingWindow
Set the currently selected EditingTool.

Specified by:
setTool in interface EditingWindow
Overrides:
setTool in class ObjectEditorWindow

updateImage

public void updateImage()
Description copied from interface: EditingWindow
Update the image displayed in this window.

Specified by:
updateImage in interface EditingWindow
Overrides:
updateImage in class ObjectEditorWindow

updateMenus

public void updateMenus()
Description copied from interface: EditingWindow
Update which menus are enabled.

Specified by:
updateMenus in interface EditingWindow
Overrides:
updateMenus in class MeshEditorWindow

getHiddenFaces

public boolean[] getHiddenFaces()
Get which faces are hidden. This may be null, which means that all faces are visible.


setHiddenFaces

public void setHiddenFaces(boolean[] hidden)
Set which faces are hidden. Pass null to show all faces.


removeExtraParameters

public void removeExtraParameters()
Remove the extra texture parameters from the mesh which were used for keeping track of face and vertex indices.


getFaceIndexParameter

public TextureParameter getFaceIndexParameter()
Get the extra texture parameter which was added to the mesh to keep track of face indices in the editor.

Overrides:
getFaceIndexParameter in class MeshEditorWindow

getJointWeightParam

public TextureParameter getJointWeightParam()
Get the extra texture parameter which was added to the mesh to keep track of joint weighting.

Overrides:
getJointWeightParam in class MeshEditorWindow

getProjectOntoSurface

public boolean getProjectOntoSurface()
Get whether the control mesh is displayed projected onto the surface.


setProjectOntoSurface

public void setProjectOntoSurface(boolean project)
Set whether the control mesh is displayed projected onto the surface.


isTolerant

public boolean isTolerant()
Determine whether we are in tolerant selection mode.


setTolerant

public void setTolerant(boolean tol)
Set whether to use tolerant selection mode.


isQuadMode

public boolean isQuadMode()
Determine whether the mesh is being displayed as quads.


setQuadMode

public void setQuadMode(boolean quads)
Set whether to display the mesh as quads.


isEdgeHidden

public boolean isEdgeHidden(int which)
Determine whether a particular edge is hidden to simulate a quad.


setSelectionMode

public void setSelectionMode(int mode)
When the selection mode changes, do our best to convert the old selection to the new mode.

Specified by:
setSelectionMode in interface MeshEditController

getSelectionMode

public int getSelectionMode()
Description copied from interface: MeshEditController
Get the current selection mode. This will be POINT_MODE, EDGE_MODE, or FACE_MODE.

Specified by:
getSelectionMode in interface MeshEditController

setSelection

public void setSelection(boolean[] sel)
Description copied from class: MeshEditorWindow
Set an array of flags specifying which parts of the mesh are selected. Depending on the selection mode, this may correspond to vertices, faces, edges, etc.

Specified by:
setSelection in interface MeshEditController
Specified by:
setSelection in class MeshEditorWindow

getSelection

public boolean[] getSelection()
Get an array of flags telling which parts of the mesh are currently selected. Depending on the current selection mode, these flags may correspond to vertices, edges, or faces.

Specified by:
getSelection in interface MeshEditController
Specified by:
getSelection in class MeshEditorWindow

getSelectionDistance

public int[] getSelectionDistance()
Description copied from class: MeshEditorWindow
Get the distance of each vertex from a selected vertex. This is 0 for a selected vertex, 1 for a vertex adjacent to a selected one, etc., up to a specified maximum distance. For vertices more than the maximum distance for a selected one, it is -1.

Specified by:
getSelectionDistance in interface MeshEditController
Specified by:
getSelectionDistance in class MeshEditorWindow

bindSkeletonCommand

public void bindSkeletonCommand()
This is overridden to update jointWeightParam after weights are changed.

Overrides:
bindSkeletonCommand in class MeshEditorWindow

unbindSkeletonCommand

public void unbindSkeletonCommand()
This is overridden to update jointWeightParam after weights are changed.

Overrides:
unbindSkeletonCommand in class MeshEditorWindow

setPointsCommand

public void setPointsCommand()
This is overridden to update jointWeightParam after weights are changed.

Overrides:
setPointsCommand in class MeshEditorWindow

selectAllCommand

public void selectAllCommand()
Select the entire mesh.


hideSelectionCommand

public void hideSelectionCommand()
Hide the selected part of the mesh.


showAllCommand

public void showAllCommand()
Show all faces of the mesh.


selectObjectBoundaryCommand

public void selectObjectBoundaryCommand()
Select the edges which form the boundary of the mesh.


selectSelectionBoundaryCommand

public void selectSelectionBoundaryCommand()
Select the edges which form the boundary of the current selection.


invertSelectionCommand

public void invertSelectionCommand()
Invert the current selection.


selectEdgeLoopCommand

public void selectEdgeLoopCommand()
Select an edge loop from every edge which is currently selected.


selectEdgeStripCommand

public void selectEdgeStripCommand()
Select an edge strip from every edge which is currently selected.


extendSelectionCommand

public void extendSelectionCommand()
Extend the selection outward by one edge.


deleteCommand

public void deleteCommand()
Delete the selected points, edges, or faces from the mesh.

Specified by:
deleteCommand in class MeshEditorWindow

subdivideCommand

public void subdivideCommand()
Subdivide selected edges or faces of the mesh.


simplifyCommand

public void simplifyCommand()

optimizeCommand

public void optimizeCommand()

bevelCommand

public void bevelCommand()

closeBoundaryCommand

public void closeBoundaryCommand()

joinBoundariesCommand

public void joinBoundariesCommand()

extractFacesCommand

public void extractFacesCommand()

extractCurveCommand

public void extractCurveCommand()

setSmoothnessCommand

public void setSmoothnessCommand()

reverseNormalsCommand

public void reverseNormalsCommand()

adjustDeltas

public void adjustDeltas(Vec3[] delta)
Given a list of deltas which will be added to the selected vertices, calculate the corresponding deltas for the unselected vertices according to the mesh tension.

Specified by:
adjustDeltas in class MeshEditorWindow


Copyright © 1999-2011 by Peter Eastman.