public abstract class NumericDataFunctionProbe extends NumericProbeBase implements CopyableComponent
Probe.ExportProps, Probe.ImportExportFileInfo
ModelComponent.NavpanelVisibility
EXPLICIT_TIME, myProps, mySmallDisplay
useOldSaveMethod, writeStartStopTimeInSeconds
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
COPY_REFERENCES, REST_POSITION
Constructor and Description |
---|
NumericDataFunctionProbe() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
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) . |
DataFunction |
getDataFunction()
Returns the data function, if any, that is used by this probe's
NumericProbeBase.apply(double) method to apply data for this probe. |
void |
getInitialState(ComponentState newstate,
ComponentState oldstate)
Gets an initial state for this component and returns the value in
state . |
void |
getState(ComponentState state)
Get the current state of this component.
|
boolean |
hasState()
Queries if this component has state.
|
boolean |
isCloneable() |
boolean |
isDuplicatable()
Returns true if this component can be duplicated.
|
void |
setDataFunction(DataFunction func)
Sets a data function to be used by this probe, either in
NumericControlProbe.applyData(maspack.matrix.VectorNd, double, double) (for NumericControlProbes),
or NumericMonitorProbe.generateData(maspack.matrix.VectorNd, double, double) (for NumericMonitorProbes). |
void |
setState(ComponentState state)
Set the state of this component.
|
addData, apply, applyDefaultDisplayRanges, clearData, createNumericList, decreaseDisplayRanges, dispose, export, getAllPropertyInfo, getAttachedProperties, getData, getDefaultDisplayMax, getDefaultDisplayMin, getDefaultDisplayRange, getDisplay, getDrivers, getExportFileInfo, getExportProps, getFormat, getInterpolation, getInterpolationOrder, getLegend, getMatlabName, getMinMaxValues, getNumericList, getOrderedTraceIndex, getPlotTraceInfo, getRange, getRange, getTraceColor, getTraceLabel, getTraceManager, getValues, getVariables, getVsize, importData, importText, increaseDisplayRanges, isDisplayable, isEmpty, isPrintable, isSmallDisplayVisible, isTraceVisible, isValidVariableName, isWritable, loadFromMatlab, print, read, removeDisplay, removeLegend, resetTraceColors, resetTraceOrder, saveToMatlab, scaleNumericList, setDefaultDisplayRange, setDefaultDisplayRange, setFormat, setInterpolation, setInterpolationOrder, setLegend, setLegendLabels, setScale, setSmallDisplayVisible, setTraceColor, setTraceLabel, setTraceOrder, setTraceVisible, setValues, smoothWithMovingAverage, smoothWithSavitzkyGolay, swapPlotTraceOrder, updateDisplays, updateDisplays, updateDisplaysForPropertyChanges, updateDisplaysWithoutAutoRanging, writeText
getAttachedFile, getAttachedFileName, getChildren, getClippedVirtualTime, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getDuration, getExportFile, getExportFileName, getFileFromPath, getImportFile, getImportFileInfo, getImportFileName, getPathFromFile, getProperty, getScale, getStartTime, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, isAttachedFileRelative, isEventTime, isInput, isScalable, isSettable, load, nextEventTime, save, scan, setAttachedFileName, setData, setExportFileName, setImportFileName, setInterval, setName, setScalable, setStartStopTimes, setStartTime, setStopTime, setTrack, setUpdateInterval
finalize, getModel, initialize, isActive, setActive, setModel, setModelFromComponent, write
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isScanning, isSelected, makeValidName, makeValidName, notifyParentOfChange, postscan, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy, getCopyReferences
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 void setDataFunction(DataFunction func)
NumericControlProbe.applyData(maspack.matrix.VectorNd, double, double)
(for NumericControlProbes),
or NumericMonitorProbe.generateData(maspack.matrix.VectorNd, double, double)
(for NumericMonitorProbes).
If the data function is set to
null
, then this probe will do nothing. If the
NumericControlProbe.applyData(maspack.matrix.VectorNd, double, double)
or
NumericMonitorProbe.generateData(maspack.matrix.VectorNd, double, double)
method is overridden by a subclass, then the data
application is determined instead by the overriding method.getDataFunction()
public DataFunction getDataFunction()
NumericProbeBase.apply(double)
method to apply data for this probe.public boolean hasState()
ModelComponent
hasState
in interface ModelComponent
hasState
in class Probe
true
if this component has statepublic ComponentState createState(ComponentState prevState)
HasState
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
createState
in class Probe
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)
HasState
public void setState(ComponentState state)
HasState
public void getInitialState(ComponentState newstate, ComponentState oldstate)
HasState
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
getInitialState
in class Probe
newstate
- receives the state informationoldstate
- previous state information; may be null
.public boolean isDuplicatable()
true
if and only if CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent)
returns true.
This method is not currently used. It is intended to provide a faster
way of determining if a component can be duplicated, without having to
use CopyableComponent.getCopyReferences(java.util.List<artisynth.core.modelbase.ModelComponent>, artisynth.core.modelbase.ModelComponent)
to build the list of copy references.
isDuplicatable
in interface CopyableComponent
true
if this component can be duplicated.public boolean isCloneable()
isCloneable
in class NumericProbeBase
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NumericProbeBase
java.lang.CloneNotSupportedException