artisynth.core.modelbase
Class ModelAgentBase

java.lang.Object
  extended by artisynth.core.modelbase.ModelComponentBase
      extended by artisynth.core.modelbase.ModelAgentBase
All Implemented Interfaces:
HasState, ModelAgent, ModelComponent, java.lang.Cloneable, HasProperties, HierarchyNode, Scannable
Direct Known Subclasses:
ControllerMonitorBase, Probe

public abstract class ModelAgentBase
extends ModelComponentBase
implements ModelAgent

Base class for Probes, Controllers, and Monitors.


Nested Class Summary
 
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent
ModelComponent.NavpanelVisibility
 
Field Summary
 
Fields inherited from class artisynth.core.modelbase.ModelComponentBase
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, myProps, NULL_OBJ, useCompactPathNames
 
Constructor Summary
ModelAgentBase()
           
 
Method Summary
 void dispose()
          Remove resources used by this agent.
 void finalize()
           
 Model getModel()
           
 void initialize(double t)
           
 void setModel(Model model)
           
 void setModelFromComponent(ModelComponent comp)
           
 void write(java.io.PrintWriter pw, NumberFormat fmt, java.lang.Object ref)
          Writes a text description of this element to a PrintWriter.
 
Methods inherited from class artisynth.core.modelbase.ModelComponentBase
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getAllPropertyInfo, getChildren, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasChildren, hasState, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, scan, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface artisynth.core.modelbase.ModelComponent
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, postscan, scan, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences
 
Methods inherited from interface maspack.properties.HasProperties
getAllPropertyInfo, getProperty
 
Methods inherited from interface maspack.properties.HierarchyNode
getChildren, hasChildren
 
Methods inherited from interface maspack.util.Scannable
isWritable
 
Methods inherited from interface artisynth.core.modelbase.HasState
createState, getInitialState, getState, setState
 

Constructor Detail

ModelAgentBase

public ModelAgentBase()
Method Detail

initialize

public void initialize(double t)
Specified by:
initialize in interface ModelAgent

setModelFromComponent

public void setModelFromComponent(ModelComponent comp)

setModel

public void setModel(Model model)
Specified by:
setModel in interface ModelAgent

getModel

public Model getModel()
Specified by:
getModel in interface ModelAgent

write

public void write(java.io.PrintWriter pw,
                  NumberFormat fmt,
                  java.lang.Object ref)
           throws java.io.IOException
Description copied from class: ModelComponentBase
Writes a text description of this element to a PrintWriter. The text description should be compatable with scan and complete enough to allow full reconstruction of the element.

Specified by:
write in interface Scannable
Overrides:
write in class ModelComponentBase
Parameters:
pw - stream for writing the element
fmt - numeric formating information
ref - optional reference object which can be used for producing references to other objects
Throws:
java.io.IOException - if an I/O error occured

dispose

public void dispose()
Remove resources used by this agent. Should be overridden by sub-classes as necessary.

Specified by:
dispose in interface ModelAgent

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object