maspack.render
Class RenderableBase
java.lang.Object
maspack.render.GLRenderableBase
maspack.render.RenderableBase
- All Implemented Interfaces:
- GLRenderable, GLSelectable, HasRenderProps, Renderable
- Direct Known Subclasses:
- MeshThicken.Region
public abstract class RenderableBase
- extends GLRenderableBase
- implements Renderable
Method Summary |
RenderProps |
getRenderProps()
Returns the render properities for this object. |
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. |
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 |
setRenderProps(RenderProps props)
Assigns a new set of render properties to this object. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RenderableBase
public RenderableBase()
isSelectable
public boolean isSelectable()
- Returns true if this object is in fact selectable.
- Specified by:
isSelectable
in interface GLSelectable
- Returns:
- true if this object is selectable
numSelectionQueriesNeeded
public 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. Otherwise, this method should return -1.
- Specified by:
numSelectionQueriesNeeded
in interface GLSelectable
- Returns:
- maximum number of selection queries needed by this component, or
-1 if this component does not manage its own selection.
getSelection
public 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. 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.
- Specified by:
getSelection
in interface GLSelectable
- Parameters:
list
- selected objects are appended to the end of this listqid
- index of the selection query
getRenderProps
public RenderProps getRenderProps()
- Returns the render properities for this object. If no render properties
are assigned, this routines returns null.
- Specified by:
getRenderProps
in interface HasRenderProps
- Returns:
- current render properties for this object
setRenderProps
public void setRenderProps(RenderProps props)
- Assigns a new set of render properties to this object. An argument of
null
will remove render properties from this object.
- Specified by:
setRenderProps
in interface HasRenderProps
- Parameters:
props
- new render properties for this object