|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartisynth.core.modelbase.ModelComponentBase
artisynth.core.modelbase.ModelAgentBase
artisynth.core.probes.Probe
artisynth.core.probes.NumericProbeBase
artisynth.core.probes.NumericOutputProbe
public class NumericOutputProbe
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary | |
---|---|
static PropertyList |
myProps
|
Fields inherited from class artisynth.core.probes.Probe |
---|
useOldSaveMethod, writeStartStopTimeInSeconds |
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Fields inherited from interface artisynth.core.modelbase.CopyableComponent |
---|
COPY_REFERENCES |
Constructor Summary | |
---|---|
NumericOutputProbe()
|
|
NumericOutputProbe(ModelComponent comp,
java.lang.String propName,
double startTime,
double stopTime,
double interval)
|
|
NumericOutputProbe(ModelComponent comp,
java.lang.String propName,
java.lang.String fileName,
double interval)
|
|
NumericOutputProbe(Property[] props,
double interval)
|
|
NumericOutputProbe(Property[] props,
double interval,
double ymin,
double ymax)
|
Method Summary | |
---|---|
void |
apply(double t)
Called when the probe is being applied to a model |
java.lang.Object |
clone()
|
ModelComponent |
copy(int flags,
java.util.Map<ModelComponent,ModelComponent> copyMap)
Create a copy of this component. |
PropertyList |
getAllPropertyInfo()
Returns a list giving static information about all properties exported by this object. |
boolean |
getCopyReferences(java.util.List<ModelComponent> refs,
ModelComponent ancestor)
Collects external references which must also be copied in order to duplicate this component. |
NumericList |
getOutput()
|
boolean |
getShowHeader()
|
boolean |
getShowTime()
|
boolean |
isDuplicatable()
Returns true if this component can be duplicated. |
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component. |
void |
save()
When called (perhaps by the Artsynth timeline), causes information about this probe to be written to its attached file. |
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer. |
boolean |
scanItem(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens)
|
void |
set(Property[] props,
java.lang.String[] driverExpressions,
java.lang.String[] variableNames)
|
void |
set(Property[] props,
java.lang.String[] driverExpressions,
java.lang.String[] variableNames,
PlotTraceInfo[] traceInfos)
|
void |
setAttachedFileName(java.lang.String fileName,
java.lang.String fmtStr)
|
void |
setAttachedFileName(java.lang.String fileName,
java.lang.String fmtStr,
boolean showTime,
boolean showHeader)
|
void |
setOutputProperties(Property[] props)
|
void |
setShowHeader(boolean enable)
|
void |
setShowTime(boolean enable)
|
void |
write(java.io.PrintWriter pw,
java.lang.String fmtStr,
boolean showTime)
Writes the start and stop times, scale value, and data for this probe to a PrintWriter, using the format described for NumericInputProbe.read(File) . |
void |
writeData(java.io.PrintWriter pw,
java.lang.String fmtStr,
boolean showTime)
|
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor)
write components to a file |
Methods inherited from class artisynth.core.probes.Probe |
---|
createState, getAttachedFile, getAttachedFileName, getChildren, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getInitialState, getProperty, getScale, getStartTime, getState, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, hasState, isActive, isAttachedFileRelative, isEventTime, isInput, isScalable, isSettable, load, nextEventTime, setActive, setAttachedFileName, setData, setName, setScalable, setStartStopTimes, setStartTime, setState, setStopTime, setTrack, setUpdateInterval |
Methods inherited from class artisynth.core.modelbase.ModelAgentBase |
---|
finalize, getModel, initialize, setModel, setModelFromComponent, write |
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, setFixed, setMarked, setName, setNumber, setParent, setSelected, updateReferences |
Methods inherited from interface maspack.properties.HasProperties |
---|
getProperty |
Methods inherited from interface maspack.properties.HierarchyNode |
---|
getChildren, hasChildren |
Methods inherited from interface maspack.util.Scannable |
---|
isWritable, write |
Field Detail |
---|
public static PropertyList myProps
Constructor Detail |
---|
public NumericOutputProbe()
public NumericOutputProbe(ModelComponent comp, java.lang.String propName, java.lang.String fileName, double interval)
public NumericOutputProbe(ModelComponent comp, java.lang.String propName, double startTime, double stopTime, double interval)
public NumericOutputProbe(Property[] props, double interval, double ymin, double ymax)
public NumericOutputProbe(Property[] props, double interval)
Method Detail |
---|
public PropertyList getAllPropertyInfo()
HasProperties
getAllPropertyInfo
in interface HasProperties
getAllPropertyInfo
in class NumericProbeBase
public boolean getShowTime()
public void setShowTime(boolean enable)
public boolean getShowHeader()
public void setShowHeader(boolean enable)
public void setOutputProperties(Property[] props)
public void write(java.io.PrintWriter pw, java.lang.String fmtStr, boolean showTime) throws java.io.IOException
NumericInputProbe.read(File)
. The format used for producing floating
point numbers can be controlled using a printf-style format string,
details of which are described in NumberFormat
.
pw
- writer which accepts the outputfmtStr
- printf-style format string (if set to null then "%g" will be assumed,
which will produce full precision output).showTime
- if true, then time values are written explicitly. Otherwise, an implicit
step size corresponding to the value returned by getUpdateInterval
will be specified.
java.io.IOException
- if an I/O error occurs.public void setAttachedFileName(java.lang.String fileName, java.lang.String fmtStr)
public void setAttachedFileName(java.lang.String fileName, java.lang.String fmtStr, boolean showTime, boolean showHeader)
public void save() throws java.io.IOException
save
in class Probe
java.io.IOException
write(java.io.PrintWriter, java.lang.String, boolean)
public void writeData(java.io.PrintWriter pw, java.lang.String fmtStr, boolean showTime)
public void apply(double t)
Probe
apply
in class NumericProbeBase
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NumericProbeBase
java.lang.CloneNotSupportedException
public NumericList getOutput()
public boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOException
public void scan(ReaderTokenizer rtok, java.lang.Object ref) throws java.io.IOException
ModelComponentBase
write
.
scan
in interface ModelComponent
scan
in interface Scannable
scan
in class Probe
rtok
- Tokenizer from which to scan the elementref
- optional reference object which can be used for resolving references to
other objects
java.io.IOException
- if an I/O or formatting error occuredpublic void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
ModelComponent
scan()
method and stored in the token queue.
The most common use of this method is to resolve the paths
of component references, which may not have been created
at the time of the initial scan()
call.
postscan
in interface ModelComponent
postscan
in class ModelComponentBase
tokens
- token information that was stored during
scan()
.ancestor
- ancestor component with respect to which
reference component paths are defined.
java.io.IOException
public void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
Probe
java.io.IOException
public void set(Property[] props, java.lang.String[] driverExpressions, java.lang.String[] variableNames)
public void set(Property[] props, java.lang.String[] driverExpressions, java.lang.String[] variableNames, PlotTraceInfo[] traceInfos)
public boolean isDuplicatable()
true
if and only if CopyableComponent.getCopyReferences(java.util.List, 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
to build the list of copy references.
isDuplicatable
in interface CopyableComponent
true
if this component can be duplicated.public boolean getCopyReferences(java.util.List<ModelComponent> refs, ModelComponent ancestor)
true
if and only if CopyableComponent.isDuplicatable()
returns
true.
getCopyReferences
in interface CopyableComponent
refs
- list to which references are appendedancestor
- root node of the hierarchy from which references are to be excluded
public ModelComponent copy(int flags, java.util.Map<ModelComponent,ModelComponent> copyMap)
CopyableComponent
COPY_REFERENCES
is set in flags
, then any component referenced
by this component should itself be set to a copy. This
should be done first checking copyMap
for an
existing copy of the referenced component. If there is no existing
copy, then a copy should be created by calling copy
recursively and adding the new copy to copyMap
.
copy
in interface CopyableComponent
copy
in class ModelComponentBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |