public abstract class DrawToolBase extends DragToolBase implements Dragger3d
Modifier and Type | Class and Description |
---|---|
static class |
DrawToolBase.FrameBinding |
TRANSLUCENT, TWO_DIMENSIONAL
Modifier and Type | Method and Description |
---|---|
void |
addListener(DrawToolListener l) |
abstract void |
clear()
Clears the drawn contents of this tool.
|
void |
fireDrawToolAddedListeners() |
void |
fireDrawToolBeginListeners(int modifiersEx) |
void |
fireDrawToolEndListeners(int modifiersEx) |
void |
fireDrawToolRemovedListeners() |
RigidTransform3d |
getFrame() |
DrawToolBase.FrameBinding |
getFrameBinding() |
double |
getFrameOffset() |
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
void |
getSelection(java.util.LinkedList<java.lang.Object> list,
int qid)
Append to
list the component (or components) associated with
the qid -th selection query issued by this component's render
method. |
void |
getToolToWorld(RigidTransform3d X) |
GLViewer |
getViewer()
Returns a reference to the viewer which is handling this drawTool.
|
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
boolean |
isVisible() |
boolean |
mouseClicked(MouseRayEvent e) |
boolean |
mouseDragged(MouseRayEvent e) |
boolean |
mouseMoved(MouseRayEvent e) |
boolean |
mousePressed(MouseRayEvent e) |
boolean |
mouseReleased(MouseRayEvent e) |
int |
numSelectionQueriesNeeded()
If this selectable manages its own selection (by issuing selection
queries within its
render method), then this method should
return the maximum number of selection queries that will be
required. |
void |
prerender(RenderList list)
Prepare for rendering, and potentially add itself to a list to be drawn
by a GLRenderer.
|
boolean |
removeListener(DrawToolListener l) |
void |
setFrame(RigidTransform3d X) |
void |
setFrameBinding(DrawToolBase.FrameBinding binding) |
void |
setFrameOffset(double offset) |
void |
setViewer(GLViewer viewer)
Used by the viewer to set a reference to itself when the drawTool is added.
|
void |
setVisible(boolean visible) |
void |
updateBounds(Point3d pmin,
Point3d pmax)
Update the minimum and maximum points for this object.
|
isDragging, updateKeyMasks
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
render
public void setFrameBinding(DrawToolBase.FrameBinding binding)
public DrawToolBase.FrameBinding getFrameBinding()
public void setFrameOffset(double offset)
public double getFrameOffset()
public abstract void clear()
public void setFrame(RigidTransform3d X)
public RigidTransform3d getFrame()
public void getToolToWorld(RigidTransform3d X)
public void addListener(DrawToolListener l)
public boolean removeListener(DrawToolListener l)
public void fireDrawToolAddedListeners()
public void fireDrawToolBeginListeners(int modifiersEx)
public void fireDrawToolEndListeners(int modifiersEx)
public void fireDrawToolRemovedListeners()
public void setVisible(boolean visible)
public boolean mouseClicked(MouseRayEvent e)
mouseClicked
in interface Dragger3d
public boolean mousePressed(MouseRayEvent e)
mousePressed
in interface Dragger3d
public boolean mouseReleased(MouseRayEvent e)
mouseReleased
in interface Dragger3d
public boolean mouseDragged(MouseRayEvent e)
mouseDragged
in interface Dragger3d
public boolean mouseMoved(MouseRayEvent e)
mouseMoved
in interface Dragger3d
public void setViewer(GLViewer viewer)
public GLViewer getViewer()
public void updateBounds(Point3d pmin, Point3d pmax)
GLRenderable
updateBounds
in interface GLRenderable
pmin
- minimum pointpmax
- maximum pointpublic boolean isSelectable()
isSelectable
in interface GLSelectable
public int numSelectionQueriesNeeded()
render
method), then this method should
return the maximum number of selection queries that will be
required. Otherwise, this method should return -1.numSelectionQueriesNeeded
in interface GLSelectable
public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
list
the component (or components) associated with
the qid
-th selection query issued by this component's render
method. This will only be called if this component manages its own
selection (i.e., the number nums
returned by GLSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface GLSelectable
list
- selected objects are appended to the end of this listqid
- index of the selection querypublic void prerender(RenderList list)
prerender
in interface GLRenderable
public int getRenderHints()
TRANSLUCENT
.getRenderHints
in interface GLRenderable