public abstract class ControllerMonitorBase extends ModelAgentBase implements RenderableComponent
ModelComponent.NavpanelVisibility
myProps
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
TRANSPARENT, TWO_DIMENSIONAL
Constructor and Description |
---|
ControllerMonitorBase() |
Modifier and Type | Method and Description |
---|---|
ModelComponent |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap) |
RenderProps |
createRenderProps()
Factory method to create render properties appropriate to this object.
|
ComponentState |
createState(ComponentState prevState)
Factory routine to create a state object for this component, which can
then be used as an argument for
HasState.setState(artisynth.core.modelbase.ComponentState) and HasState.getState(artisynth.core.modelbase.ComponentState) . |
void |
getInitialState(ComponentState newstate,
ComponentState oldstate)
Gets an initial state for this component and returns the value in
state . |
int |
getRenderHints()
Returns a bit code giving rendering hints about this renderable.
|
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. |
void |
getState(ComponentState state)
Get the current state of this component.
|
boolean |
hasState()
Queries if this component has state.
|
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 |
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).
|
abstract void |
render(Renderer renderer,
int flags)
Render this object using the functionality of the supplied
Renderer . |
void |
setRenderProps(RenderProps props)
Assigns a new set of render properties to this object.
|
void |
setState(ComponentState state)
Set the state of this component.
|
void |
updateBounds(Vector3d pmin,
Vector3d pmax)
Update the minimum and maximum points for this object.
|
dispose, finalize, getAllPropertyInfo, getModel, initialize, isActive, setActive, setModel, setModelFromComponent, write
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, notifyParentOfChange, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getAllPropertyInfo, getProperty
getChildren, hasChildren
postscan
isWritable, write
public RenderProps getRenderProps()
HasRenderProps
getRenderProps
in interface HasRenderProps
public void setRenderProps(RenderProps props)
HasRenderProps
null
will remove render properties from this object.setRenderProps
in interface HasRenderProps
props
- new render properties for this objectpublic 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 updateBounds(Vector3d pmin, Vector3d pmax)
IsRenderable
updateBounds
in interface IsRenderable
pmin
- minimum pointpmax
- maximum pointpublic abstract void render(Renderer renderer, int flags)
IsRenderable
Renderer
.render
in interface IsRenderable
renderer
- provides the functionality used to perform the rendering.flags
- flags that may be used to control different
aspects of the rendering. Flags are defined in Renderer
and currently include
Renderer.HIGHLIGHT
and
Renderer.SORT_FACES
.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 querypublic RenderProps createRenderProps()
HasRenderProps
createRenderProps
in interface HasRenderProps
public int getRenderHints()
IsRenderable
TRANSPARENT
and
TWO_DIMENSIONAL
.getRenderHints
in interface IsRenderable
public boolean 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 ModelComponent copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
copy
in class ModelComponentBase
public boolean hasState()
hasState
in interface ModelComponent
hasState
in class ModelComponentBase
true
if this component has statepublic ComponentState createState(ComponentState prevState)
HasState.setState(artisynth.core.modelbase.ComponentState)
and HasState.getState(artisynth.core.modelbase.ComponentState)
. The state object does not have to be set to the component's
current state. If the component does not have any state information,
this method should return an instance of
EmptyState
.createState
in interface HasState
prevState
- If non-null, supplies a previous state that
was created by this component and which can be used to provide
pre-sizing hints.public void getState(ComponentState state)
public void setState(ComponentState state)
public void getInitialState(ComponentState newstate, ComponentState oldstate)
state
. If prevstate
is non-null, then it is
assumed to contain a previous initial state value returned by this
method, and state
should be set to be as consistent with
this previous state as possible. For example, suppose that this component
currently contains subcomponents A, B, and C, while the
prevstate
contains the state from a previous time when it
had components B, C, and D. Then state
should contain
substate values for B and C that are taken from
prevstate
. To facilitate this, the information returned in
state
should contain additional information such as the
identities of all the (current) subcomponents.getInitialState
in interface HasState
newstate
- receives the state informationoldstate
- previous state information; may be null
.