artofillusion
Class MeshEditorWindow

java.lang.Object
  extended by BFrame
      extended by artofillusion.ObjectEditorWindow
          extended by artofillusion.MeshEditorWindow
All Implemented Interfaces:
EditingWindow, MeshEditController
Direct Known Subclasses:
CurveEditorWindow, SkeletonShapeEditorWindow, SplineMeshEditorWindow, TriMeshEditorWindow

public abstract class MeshEditorWindow
extends ObjectEditorWindow
implements MeshEditController, EditingWindow

The MeshEditorWindow class represents the window for editing Mesh objects. This is an abstract class, with subclasses for various types of objects.


Field Summary
 
Fields inherited from interface artofillusion.ui.MeshEditController
EDGE_MODE, FACE_MODE, POINT_MODE
 
Constructor Summary
MeshEditorWindow(EditingWindow parent, java.lang.String title, ObjectInfo obj)
           
 
Method Summary
abstract  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 bindSkeletonCommand()
          Present a window for binding the selected vertices to the skeleton.
 void centerCommand()
           
abstract  void deleteCommand()
          Delete any parts of the mesh which are currently selected.
 void deleteJointCommand()
          Delete the select joint from the skeleton.
 void dispose()
          Save the display mode when the window is closed.
 void editJointCommand()
          Allow the user to edit the selected joint.
 TextureParameter getFaceIndexParameter()
          Get the extra texture parameter which was added to the mesh to keep track of face indices in the editor.
 TextureParameter getJointWeightParam()
          Get the extra texture parameter which was added to the mesh to keep track of joint weighting.
 double getMeshTension()
          Get the mesh tension level.
 Scene getScene()
          Get the Scene which is being edited in this window.
abstract  boolean[] getSelection()
          Get an array of flags specifying which parts of the mesh are selected.
abstract  int[] getSelectionDistance()
          Get the distance of each vertex from a selected vertex.
 int getTensionDistance()
          Get the distance over which mesh tension applies.
 boolean isExtraParameter(TextureParameter param)
          Determine whether a TextureParameter was added to the mesh by the editor
 boolean isFreehand()
          Determine whether to use freehand selection mode.
 void objectChanged()
          This should be called whenever the object has changed.
 void randomizeCommand()
          Displace selected vertices by a random amount.
 void redoCommand()
          Redo the last action that was undone.
 void renderPreviewCommand()
          Render a preview of the mesh.
 void setFreehand(boolean freehand)
          Set whether to use freehand selection mode.
 void setJointParentCommand()
          Allow the user to set the parent of the selected joint.
abstract  void setMesh(Mesh mesh)
          Set the Mesh object for this viewer.
 void setParametersCommand()
          Allow the user to set the texture parameters for selected vertices.
 void setPointsCommand()
          Allow the user to enter new coordinates for one or more vertices.
abstract  void setSelection(boolean[] selected)
          Set an array of flags specifying which parts of the mesh are selected.
 void setTensionCommand()
          Allow the user to set the mesh tension.
 void transformPointsCommand()
          Allow the user to transform one or more vertices.
 void unbindSkeletonCommand()
          Detach points from the selected bone.
 void undoCommand()
          Undo the most recent action.
 void updateMenus()
          Update which menus are enabled.
 
Methods inherited from class artofillusion.ObjectEditorWindow
confirmClose, getAllViews, getFrame, getToolPalette, getView, setCurrentView, setGridCommand, setHelpText, setModified, setTemplateCommand, setTool, setUndoRecord, setVisible, showAxesCommand, showTemplateCommand, toggleViewsCommand, updateImage
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artofillusion.ui.MeshEditController
getObject, getSelectionMode, setSelectionMode
 
Methods inherited from interface artofillusion.ui.EditingWindow
confirmClose, getAllViews, getFrame, getToolPalette, getView, setHelpText, setModified, setTool, setUndoRecord, updateImage
 

Constructor Detail

MeshEditorWindow

public MeshEditorWindow(EditingWindow parent,
                        java.lang.String title,
                        ObjectInfo obj)
Method Detail

dispose

public void dispose()
Save the display mode when the window is closed.

Overrides:
dispose in class ObjectEditorWindow

setMesh

public abstract void setMesh(Mesh mesh)
Set the Mesh object for this viewer.

Specified by:
setMesh in interface MeshEditController

getSelection

public abstract boolean[] getSelection()
Get 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:
getSelection in interface MeshEditController

setSelection

public abstract void setSelection(boolean[] selected)
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

getSelectionDistance

public abstract int[] getSelectionDistance()
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

objectChanged

public void objectChanged()
This should be called whenever the object has changed.

Specified by:
objectChanged in interface MeshEditController

getScene

public Scene getScene()
Description copied from interface: EditingWindow
Get the Scene which is being edited in this window. If it is not a window for editing a scene, this should return null.

Specified by:
getScene in interface EditingWindow

undoCommand

public void undoCommand()
Description copied from class: ObjectEditorWindow
Undo the most recent action.

Overrides:
undoCommand in class ObjectEditorWindow

redoCommand

public void redoCommand()
Description copied from class: ObjectEditorWindow
Redo the last action that was undone.

Overrides:
redoCommand in class ObjectEditorWindow

updateMenus

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

Specified by:
updateMenus in interface EditingWindow

isFreehand

public boolean isFreehand()
Determine whether to use freehand selection mode.


setFreehand

public void setFreehand(boolean freehand)
Set whether to use freehand selection mode.


setPointsCommand

public void setPointsCommand()
Allow the user to enter new coordinates for one or more vertices.


transformPointsCommand

public void transformPointsCommand()
Allow the user to transform one or more vertices.


randomizeCommand

public void randomizeCommand()
Displace selected vertices by a random amount.


centerCommand

public void centerCommand()

setTensionCommand

public void setTensionCommand()
Allow the user to set the mesh tension.


getMeshTension

public double getMeshTension()
Description copied from interface: MeshEditController
Get the mesh tension level.

Specified by:
getMeshTension in interface MeshEditController

getTensionDistance

public int getTensionDistance()
Description copied from interface: MeshEditController
Get the distance over which mesh tension applies.

Specified by:
getTensionDistance in interface MeshEditController

getFaceIndexParameter

public TextureParameter getFaceIndexParameter()
Get the extra texture parameter which was added to the mesh to keep track of face indices in the editor. By default this returns null. Subclasses which use an extra parameter to keep track of face indices should override it.


getJointWeightParam

public TextureParameter getJointWeightParam()
Get the extra texture parameter which was added to the mesh to keep track of joint weighting. By default this returns null. Subclasses which use an extra parameter to keep track of joint weights should override it.


isExtraParameter

public boolean isExtraParameter(TextureParameter param)
Determine whether a TextureParameter was added to the mesh by the editor


setParametersCommand

public void setParametersCommand()
Allow the user to set the texture parameters for selected vertices.


deleteCommand

public abstract void deleteCommand()
Delete any parts of the mesh which are currently selected.


deleteJointCommand

public void deleteJointCommand()
Delete the select joint from the skeleton.


setJointParentCommand

public void setJointParentCommand()
Allow the user to set the parent of the selected joint.


editJointCommand

public void editJointCommand()
Allow the user to edit the selected joint.


bindSkeletonCommand

public void bindSkeletonCommand()
Present a window for binding the selected vertices to the skeleton.


unbindSkeletonCommand

public void unbindSkeletonCommand()
Detach points from the selected bone.


renderPreviewCommand

public void renderPreviewCommand()
Render a preview of the mesh.


adjustDeltas

public abstract 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.



Copyright © 1999-2011 by Peter Eastman.