|
|||||||||
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.OutputProbe
artisynth.core.probes.WayPointProbe
public class WayPointProbe
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface artisynth.core.modelbase.ModelComponent |
---|
ModelComponent.NavpanelVisibility |
Field Summary |
---|
Fields inherited from class artisynth.core.probes.Probe |
---|
myProps, useOldSaveMethod, writeStartStopTimeInSeconds |
Fields inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames |
Constructor Summary | |
---|---|
WayPointProbe()
|
|
WayPointProbe(RootModel model)
|
Method Summary | |
---|---|
WayPoint |
add(WayPoint newWay)
Adds a WayPoint to this probe, and returns any WayPoint that previously occupied the same time location. |
void |
apply(double t)
Called when the probe is being applied to a model |
void |
clear()
|
java.util.Iterator<WayPoint> |
get()
|
WayPoint |
get(double time)
|
WayPoint |
getAfter(double t)
|
WayPoint |
getBreakPointAfter(double time)
|
boolean |
getCheckState()
|
WayPoint |
getLastValid()
|
WayPoint |
getNearestValidBefore(double time)
Find the nearest valid waypoint to a time t, whose time is less or equal to t. |
java.util.LinkedList<WayPoint> |
getPoints()
|
RootModel |
getRootModel()
|
WayPoint |
getValidAfter(double t)
|
WayPoint |
getValidBefore(double time)
Return the valid waypoint immediately before time, or null if there is no such waypoint. |
WayPoint |
getValidOnOrBefore(double time)
Return the waypoint immediately on or before time, or null if there is no such waypoint. |
void |
invalidateAfterTime(double t)
Invalidates all waypoints after a specified time. |
void |
invalidateAll()
Invalidates all waypoints |
boolean |
isEventTime(double t)
|
void |
load()
Load waypoint state data from the attached file. |
void |
loadfrom()
|
void |
loadfrom(java.lang.String fileName)
|
double |
maxEventTime()
|
double |
nextEventTime(double t)
|
int |
numValid()
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component. |
boolean |
remove(WayPoint way)
|
void |
save()
Write all waypoint state to the attached file if it exists. |
void |
saveas()
|
void |
saveas(java.lang.String fileName)
|
void |
scan(ReaderTokenizer rtok,
java.lang.Object ref)
Scans this element from a ReaderTokenizer. |
boolean |
scanItem(ReaderTokenizer rtok,
java.util.Deque<ScanToken> tokens)
|
void |
setCheckState(boolean enable)
|
int |
size()
|
void |
writeItems(java.io.PrintWriter pw,
NumberFormat fmt,
CompositeComponent ancestor)
write components to a file |
Methods inherited from class artisynth.core.probes.Probe |
---|
createState, getAllPropertyInfo, getAttachedFile, getAttachedFileName, getChildren, getDefaultScale, getDefaultStartTime, getDefaultStopTime, getDefaultUpdateInterval, getInitialState, getProperty, getScale, getStartTime, getState, getStopTime, getTimelineTime, getTrack, getUpdateInterval, getVirtualTime, hasAttachedFile, hasChildren, hasState, isActive, isAttachedFileRelative, isCloneable, isInput, isPrintable, isScalable, isSettable, print, setActive, setAttachedFileName, setData, setName, setScalable, setScale, setStartStopTimes, setStartTime, setState, setStopTime, setTrack, setUpdateInterval |
Methods inherited from class artisynth.core.modelbase.ModelAgentBase |
---|
dispose, finalize, getModel, initialize, setModel, setModelFromComponent, write |
Methods inherited from class artisynth.core.modelbase.ModelComponentBase |
---|
checkFlag, checkName, checkNameUniqueness, clearFlag, clone, connectToHierarchy, copy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getSoftReferences, isFixed, isMarked, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, 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, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setNumber, setParent, setSelected, updateReferences |
Methods inherited from interface maspack.util.Scannable |
---|
isWritable |
Constructor Detail |
---|
public WayPointProbe()
public WayPointProbe(RootModel model)
Method Detail |
---|
public void setCheckState(boolean enable)
public boolean getCheckState()
public WayPoint add(WayPoint newWay)
newWay
- new WayPoint to add
public java.util.Iterator<WayPoint> get()
public boolean remove(WayPoint way)
public void clear()
public double nextEventTime(double t)
nextEventTime
in class Probe
public boolean isEventTime(double t)
isEventTime
in class Probe
public int size()
public int numValid()
public double maxEventTime()
public java.util.LinkedList<WayPoint> getPoints()
public WayPoint getAfter(double t)
public WayPoint getValidAfter(double t)
public WayPoint getNearestValidBefore(double time)
public WayPoint getLastValid()
public WayPoint getBreakPointAfter(double time)
public WayPoint getValidOnOrBefore(double time)
public WayPoint getValidBefore(double time)
public WayPoint get(double time)
public void apply(double t)
Probe
apply
in class OutputProbe
public void invalidateAfterTime(double t)
t
- invalidate waypoints after this timepublic void invalidateAll()
public void save()
save
in class Probe
public void saveas()
public void saveas(java.lang.String fileName)
public void load()
load
in class Probe
public void loadfrom(java.lang.String fileName)
public void loadfrom()
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 boolean scanItem(ReaderTokenizer rtok, java.util.Deque<ScanToken> tokens) throws java.io.IOException
java.io.IOException
public void writeItems(java.io.PrintWriter pw, NumberFormat fmt, CompositeComponent ancestor) throws java.io.IOException
Probe
java.io.IOException
public RootModel getRootModel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |