artofillusion
Class MeshViewer

java.lang.Object
  extended by CustomWidget
      extended by artofillusion.ViewerCanvas
          extended by artofillusion.ObjectViewer
              extended by artofillusion.MeshViewer
Direct Known Subclasses:
CurveViewer, SplineMeshViewer, TriMeshViewer, UVMappingViewer

public abstract class MeshViewer
extends ObjectViewer

MeshViewer is an abstract subclass of ViewerCanvas used for displaying Mesh objects.


Field Summary
static int HANDLE_SIZE
           
 
Fields inherited from class artofillusion.ViewerCanvas
backgroundColor, disabledColor, handleColor, highlightColor, highValueColor, lineColor, lowValueColor, RENDER_FLAT, RENDER_RENDERED, RENDER_SMOOTH, RENDER_TEXTURED, RENDER_TRANSPARENT, RENDER_WIREFRAME, specialHighlightColor, surfaceColor, surfaceRGBColor, transparentColor, VIEW_BACK, VIEW_BOTTOM, VIEW_FRONT, VIEW_LEFT, VIEW_OTHER, VIEW_RIGHT, VIEW_TOP
 
Constructor Summary
MeshViewer(MeshEditController controller, RowContainer p)
           
 
Method Summary
 double[] estimateDepthRange()
          Estimate the range of depth values that the camera will need to render.
 boolean[] getLockedJoints()
          Get an array of size [# joints in skeleton] specifyiing which ones are locked.
 boolean getMeshVisible()
          Get whether the control mesh is visible.
 int getSelectedJoint()
          Get the ID of the selected joint.
 boolean getSkeletonDetached()
          Get whether the mesh is detached from the skeleton.
 boolean getSkeletonVisible()
          Get whether the skeleton is visible.
 TextureParameter getSurfaceTextureParameter()
          Get the parameter by which the surface is colored.
 boolean getSurfaceVisible()
          Get whether the surface is visible.
 boolean isJointLocked(int id)
          Determine whether a particular joint is locked.
 void lockJoint(int id)
          Lock the joint with the specified ID.
 void setMeshVisible(boolean visible)
          Set whether the control mesh is visible.
 void setSelectedJoint(int id)
          Set the selected joint.
 void setSkeletonDetached(boolean detached)
          Set whether the mesh is detached from the skeleton.
 void setSkeletonVisible(boolean visible)
          Set whether the skeleton is visible.
 void setSurfaceTextureParameter(TextureParameter param)
          Set the parameter by which the surface is colored.
 void setSurfaceVisible(boolean visible)
          Set whether the surface is visible.
 void unlockJoint(int id)
          Unlock the joint with the specified ID.
 
Methods inherited from class artofillusion.ObjectViewer
beginDraggingSelection, endDraggingSelection, getController, getDisplayCoordinates, getFreehandSelection, getScene, getSceneVisible, getUseWorldCoords, previewObject, selectionRegionContains, selectionRegionIntersects, setFreehandSelection, setScene, setSceneVisible, setUseWorldCoords, updateImage, viewChanged
 
Methods inherited from class artofillusion.ViewerCanvas
addViewerControl, addViewerControl, adjustCamera, copyOrientationFromCamera, drawBorder, drawBox, drawBoxes, drawDraggedShape, drawHRule, drawImage, drawLine, drawShape, drawString, drawVRule, fillShape, frameBox, getActionProcessor, getBoundCamera, getCamera, getCanvasDrawer, getCurrentTool, getDefaultRotationCenter, getDrawFocus, getGridSpacing, getMinimumSize, getOrientation, getPreferredSize, getRenderMode, getRotationCenter, getScale, getShowAxes, getShowGrid, getSnapToGrid, getSnapToSubdivisions, getTemplateImage, getTemplateShown, getViewerControls, getViewerControlWidgets, isOpenGLAvailable, isPerspective, prepareCameraForRendering, removeViewerControl, renderBox, renderBoxes, renderImage, renderLine, renderLine, renderMesh, renderMeshTransparent, renderWireframe, setAltTool, setBoundCamera, setDrawFocus, setGrid, setMetaTool, setOrientation, setPerspective, setPopupMenuManager, setPreferredSize, setRenderMode, setRotationCenter, setScale, setShowAxes, setShowTemplate, setTemplateImage, setTemplateImage, setTool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HANDLE_SIZE

public static final int HANDLE_SIZE
See Also:
Constant Field Values
Constructor Detail

MeshViewer

public MeshViewer(MeshEditController controller,
                  RowContainer p)
Method Detail

getSelectedJoint

public int getSelectedJoint()
Get the ID of the selected joint.


setSelectedJoint

public void setSelectedJoint(int id)
Set the selected joint.


getLockedJoints

public boolean[] getLockedJoints()
Get an array of size [# joints in skeleton] specifyiing which ones are locked.


isJointLocked

public boolean isJointLocked(int id)
Determine whether a particular joint is locked.


lockJoint

public void lockJoint(int id)
Lock the joint with the specified ID.


unlockJoint

public void unlockJoint(int id)
Unlock the joint with the specified ID.


getMeshVisible

public boolean getMeshVisible()
Get whether the control mesh is visible.


setMeshVisible

public void setMeshVisible(boolean visible)
Set whether the control mesh is visible.


getSurfaceVisible

public boolean getSurfaceVisible()
Get whether the surface is visible.


setSurfaceVisible

public void setSurfaceVisible(boolean visible)
Set whether the surface is visible.


getSkeletonVisible

public boolean getSkeletonVisible()
Get whether the skeleton is visible.


setSkeletonVisible

public void setSkeletonVisible(boolean visible)
Set whether the skeleton is visible.


getSkeletonDetached

public boolean getSkeletonDetached()
Get whether the mesh is detached from the skeleton.


setSkeletonDetached

public void setSkeletonDetached(boolean detached)
Set whether the mesh is detached from the skeleton.


getSurfaceTextureParameter

public TextureParameter getSurfaceTextureParameter()
Get the parameter by which the surface is colored.


setSurfaceTextureParameter

public void setSurfaceTextureParameter(TextureParameter param)
Set the parameter by which the surface is colored.


estimateDepthRange

public double[] estimateDepthRange()
Estimate the range of depth values that the camera will need to render. This need not be exact, but should err on the side of returning bounds that are slightly too large.

Overrides:
estimateDepthRange in class ObjectViewer
Returns:
the two element array {minDepth, maxDepth}


Copyright © 1999-2011 by Peter Eastman.