artofillusion.texture
Class UVMappingWindow

java.lang.Object
  extended by BDialog
      extended by artofillusion.texture.UVMappingWindow
All Implemented Interfaces:
EditingWindow, MeshEditController

public class UVMappingWindow
extends BDialog
implements MeshEditController, EditingWindow

UVMappingWindow is a window for editing the UV texture coordinates at each vertex of a mesh.


Field Summary
 
Fields inherited from interface artofillusion.ui.MeshEditController
EDGE_MODE, FACE_MODE, POINT_MODE
 
Constructor Summary
UVMappingWindow(BDialog parent, Object3D obj, UVMapping map)
           
 
Method Summary
 boolean confirmClose()
          Confirm whether this window should be closed (possibly by displaying a message to the user), and then close it.
 void displayRangeChanged()
          This is called when the displayed texture range changes.
 ViewerCanvas[] getAllViews()
          Get all ViewerCanvases contained in this window.
 BFrame getFrame()
          Get the Frame for this EditingWindow: either the EditingWindow itself if it is a Frame, or its parent if it is a Dialog.
 double getMeshTension()
          Get the mesh tension level.
 ObjectInfo getObject()
          Get the object being edited in this window.
 Scene getScene()
          Get the Scene which is being edited in this window.
 boolean[] getSelection()
          Get an array of flags specifying which parts of the object are selected.
 int[] getSelectionDistance()
          Selection distance is simply 0 if the vertex is selected, and -1 otherwise.
 int getSelectionMode()
          Get the current selection mode.
 int getTensionDistance()
          Get the distance over which mesh tension applies.
 ToolPalette getToolPalette()
          Get the ToolPalette for this window.
 ViewerCanvas getView()
          Get the ViewerCanvas in which the UV coordinates are being edited.
 void objectChanged()
          This is called whenever the mesh has changed.
 void setHelpText(java.lang.String text)
          Set the text to display at the bottom of the window.
 void setMesh(Mesh mesh)
          Set the mesh being edited.
 void setModified()
          Register that the scene or object contained in the window has been modified.
 void setSelection(boolean[] selected)
          Set an array of flags specifying which parts of the object are selected.
 void setSelectionMode(int mode)
          Set the current selection mode.
 void setTextureCoords(Vec2[] coords)
          Update the texture coordinates of the mesh.
 void setTool(EditingTool tool)
          Set the currently selected EditingTool.
 void setUndoRecord(UndoRecord command)
          Set the current UndoRecord for this EditingWindow.
 void updateImage()
          Update the image displayed in this window.
 void updateMenus()
          This will be called whenever the selection changes, so rebuild the mesh and update the text fields.
 void updateTextFields()
          Update the U and V text fields to reflect the current selection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UVMappingWindow

public UVMappingWindow(BDialog parent,
                       Object3D obj,
                       UVMapping map)
Method Detail

getObject

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

Specified by:
getObject in interface MeshEditController

setMesh

public void setMesh(Mesh mesh)
Set the mesh being edited.

Specified by:
setMesh in interface MeshEditController

getSelectionMode

public int getSelectionMode()
Get the current selection mode.

Specified by:
getSelectionMode in interface MeshEditController

setSelectionMode

public void setSelectionMode(int mode)
Set the current selection mode.

Specified by:
setSelectionMode in interface MeshEditController

getSelection

public boolean[] getSelection()
Get an array of flags specifying which parts of the object are selected.

Specified by:
getSelection in interface MeshEditController

setSelection

public void setSelection(boolean[] selected)
Set an array of flags specifying which parts of the object are selected.

Specified by:
setSelection in interface MeshEditController

getSelectionDistance

public int[] getSelectionDistance()
Selection distance is simply 0 if the vertex is selected, and -1 otherwise.

Specified by:
getSelectionDistance in interface MeshEditController

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

objectChanged

public void objectChanged()
This is called whenever the mesh has changed.

Specified by:
objectChanged in interface MeshEditController

displayRangeChanged

public void displayRangeChanged()
This is called when the displayed texture range changes.


setTextureCoords

public void setTextureCoords(Vec2[] coords)
Update the texture coordinates of the mesh.


getToolPalette

public ToolPalette getToolPalette()
Description copied from interface: EditingWindow
Get the ToolPalette for this window.

Specified by:
getToolPalette in interface EditingWindow

setTool

public void setTool(EditingTool tool)
Set the currently selected EditingTool.

Specified by:
setTool in interface EditingWindow

setHelpText

public void setHelpText(java.lang.String text)
Set the text to display at the bottom of the window.

Specified by:
setHelpText in interface EditingWindow

getFrame

public BFrame getFrame()
Get the Frame for this EditingWindow: either the EditingWindow itself if it is a Frame, or its parent if it is a Dialog.

Specified by:
getFrame in interface EditingWindow

updateImage

public void updateImage()
Update the image displayed in this window.

Specified by:
updateImage in interface EditingWindow

updateMenus

public void updateMenus()
This will be called whenever the selection changes, so rebuild the mesh and update the text fields.

Specified by:
updateMenus in interface EditingWindow

updateTextFields

public void updateTextFields()
Update the U and V text fields to reflect the current selection.


setUndoRecord

public void setUndoRecord(UndoRecord command)
Set the current UndoRecord for this EditingWindow.

Specified by:
setUndoRecord in interface EditingWindow

setModified

public void setModified()
Description copied from interface: EditingWindow
Register that the scene or object contained in the window has been modified.

Specified by:
setModified in interface EditingWindow

getScene

public Scene getScene()
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

getView

public ViewerCanvas getView()
Get the ViewerCanvas in which the UV coordinates are being edited.

Specified by:
getView in interface EditingWindow

getAllViews

public ViewerCanvas[] getAllViews()
Description copied from interface: EditingWindow
Get all ViewerCanvases contained in this window. This may return null if there is no ViewerCanvas.

Specified by:
getAllViews in interface EditingWindow

confirmClose

public boolean confirmClose()
Confirm whether this window should be closed (possibly by displaying a message to the user), and then close it. If the closing is canceled, this should return false.

Specified by:
confirmClose in interface EditingWindow


Copyright © 1999-2011 by Peter Eastman.