public abstract static class MultiViewerTesterBase.SimpleSelectableBase extends java.lang.Object implements MultiViewer.SimpleSelectable
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
SimpleSelectableBase() |
Modifier and Type | Method and Description |
---|---|
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
RenderProps |
getRenderProps() |
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. |
boolean |
isSelectable()
Returns true if this object is in fact selectable.
|
boolean |
isSelected() |
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)
Called prior to rendering to allow this object to update the internal
state required for rendering (such as by caching rendering coordinates).
|
void |
setRenderProps(RenderProps props) |
void |
setSelected(boolean sel) |
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
render
public void setRenderProps(RenderProps props)
public RenderProps getRenderProps()
public void prerender(RenderList list)
IsRenderable
list.addIfVisible (obj);
for each of the objects in question.prerender
in interface IsRenderable
list
- list of objects to be renderedpublic void setSelected(boolean sel)
setSelected
in interface MultiViewer.SimpleSelectable
public boolean isSelected()
isSelected
in interface MultiViewer.SimpleSelectable
public void updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
pmin
- minimum pointpmax
- maximum pointpublic int getRenderHints()
IsRenderable
TRANSPARENT
and
TWO_DIMENSIONAL
.getRenderHints
in interface IsRenderable
public boolean isSelectable()
IsSelectable
isSelectable
in interface IsSelectable
public int numSelectionQueriesNeeded()
IsSelectable
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 IsSelectable
public void getSelection(java.util.LinkedList<java.lang.Object> list, int qid)
IsSelectable
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 IsSelectable.numSelectionQueriesNeeded()
is positive), and qid
will in
turn be a number between 0 and nums
-1.getSelection
in interface IsSelectable
list
- selected objects are appended to the end of this listqid
- index of the selection query