Class Paths.Wrapper
raft.kilavuz.runtime.Paths.Wrapper All Implemented Interfaces:
-
Enclosing class:
-
public static class Paths.Wrapper
utility class to wrap another PathIterator which delegates calls to
wrapped one. think of this as a kind of adapter to intercept and modify certain
properties of returned PathPosition, animation, direction etc.
generally speaking modifying location is not suggested as subsequent
segments in path depends on last position of this segment.
Method Summary |
|
first()should return first position in sequence. |
|
hasNext()return true if sequnce is not ended. |
|
last()should return last position in sequence. |
|
next(float time)should return next position in sequence, should never return null. |
|
|
Constructor Detail
Paths.Wrapper
-
created a Wrapper wrapping given path.
Parameters:
-
path - the path to be wrapped
Method Detail
next
-
should return next position in sequence, should never return null.
return last if has already reached end.
the implementation should return last if the sequence is completed or
time > remaining()
Specified by:
-
Parameters:
-
time - passed seconds, should be positive.
Returns:
-
next position in sequence
first
-
should return first position in sequence.
this method should not rewind iterator pointer
Specified by:
-
Returns:
-
first position in sequence
last
-
should return last position in sequence.
may return null for indefinite sequences.
this method should not advance iterator pointer
Specified by:
-
Returns:
-
last position in sequence
hasNext
public boolean hasNext()
-
return true if sequnce is not ended. should be consistent with remaining,
that is if hasNext returns false, remanining should return 0 and vice versa
Specified by:
-
remaining
public float remaining()
-
returns time left in seconds. returns INDEFINITE
if sequence is infinite or cannnot be calculated.
should be consistent with hasNext, that is if hasNext returns false,
remanining should return 0 and vice versa
Specified by:
-
-
See Also:
-
DocFlex/Doclet is both a multi-format Javadoc doclet and a free edition of DocFlex/Javadoc. If you need to customize your Javadoc without writing a full-blown doclet from scratch, DocFlex/Javadoc may be the only tool able to help you! Find out more at www.docflex.com