maspack.widgets
Class SplineTool

java.lang.Object
  extended by maspack.render.DragToolBase
      extended by maspack.render.DrawToolBase
          extended by maspack.widgets.SplineTool
All Implemented Interfaces:
Dragger3d, GLRenderable, GLSelectable

public class SplineTool
extends DrawToolBase


Nested Class Summary
 
Nested classes/interfaces inherited from class maspack.render.DrawToolBase
DrawToolBase.FrameBinding
 
Field Summary
 
Fields inherited from interface maspack.render.GLRenderable
TRANSLUCENT, TWO_DIMENSIONAL
 
Constructor Summary
SplineTool()
           
 
Method Summary
 void clear()
          Clears the drawn contents of this tool.
 NURBSCurve2d getCurve()
           
 int getMaxDegree()
           
 boolean mouseClicked(MouseRayEvent e)
           
 boolean mouseDragged(MouseRayEvent e)
           
 boolean mouseMoved(MouseRayEvent e)
           
 boolean mousePressed(MouseRayEvent e)
           
 boolean mouseReleased(MouseRayEvent e)
           
 void render(GLRenderer renderer, int flags)
          Render this object using Open GL via the JOGL.
 void setCurve(NURBSCurve2d curve)
           
 void setMaxDegree(int maxd)
           
 void setViewer(GLViewer viewer)
          Used by the viewer to set a reference to itself when the drawTool is added.
 
Methods inherited from class maspack.render.DrawToolBase
addListener, fireDrawToolAddedListeners, fireDrawToolBeginListeners, fireDrawToolEndListeners, fireDrawToolRemovedListeners, getFrame, getFrameBinding, getFrameOffset, getRenderHints, getSelection, getToolToWorld, getViewer, isSelectable, isVisible, numSelectionQueriesNeeded, prerender, removeListener, setFrame, setFrameBinding, setFrameOffset, setVisible, updateBounds
 
Methods inherited from class maspack.render.DragToolBase
updateKeyMasks
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplineTool

public SplineTool()
Method Detail

getMaxDegree

public int getMaxDegree()

setMaxDegree

public void setMaxDegree(int maxd)

getCurve

public NURBSCurve2d getCurve()

clear

public void clear()
Description copied from class: DrawToolBase
Clears the drawn contents of this tool.

Specified by:
clear in class DrawToolBase

setCurve

public void setCurve(NURBSCurve2d curve)

setViewer

public void setViewer(GLViewer viewer)
Description copied from class: DrawToolBase
Used by the viewer to set a reference to itself when the drawTool is added.

Overrides:
setViewer in class DrawToolBase

mouseClicked

public boolean mouseClicked(MouseRayEvent e)
Specified by:
mouseClicked in interface Dragger3d
Overrides:
mouseClicked in class DrawToolBase

mousePressed

public boolean mousePressed(MouseRayEvent e)
Specified by:
mousePressed in interface Dragger3d
Overrides:
mousePressed in class DrawToolBase

mouseMoved

public boolean mouseMoved(MouseRayEvent e)
Specified by:
mouseMoved in interface Dragger3d
Overrides:
mouseMoved in class DrawToolBase

mouseReleased

public boolean mouseReleased(MouseRayEvent e)
Specified by:
mouseReleased in interface Dragger3d
Overrides:
mouseReleased in class DrawToolBase

mouseDragged

public boolean mouseDragged(MouseRayEvent e)
Specified by:
mouseDragged in interface Dragger3d
Overrides:
mouseDragged in class DrawToolBase

render

public void render(GLRenderer renderer,
                   int flags)
Description copied from interface: GLRenderable
Render this object using Open GL via the JOGL.

Parameters:
renderer - renderer object which is used to perform the rendering. Provides pointers to GL and GLU, along with helper functions.
flags - supplies flags that may be used to control different aspects of the rendering. Flags are defined in GLRenderer and currently include GLRenderer.SELECTED, GLRenderer.VERTEX_COLORING, GLRenderer.HSV_COLOR_INTERPOLATION, GLRenderer.SORT_FACES, and GLRenderer.CLEAR_MESH_DISPLAY_LISTS.