|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfang.Tracker
fang.CompositeTracker
public final class CompositeTracker
This class combines several trackers into a single tracker by composing the scaling, rotating, and translating. Since these operations are commutative, they compose seamlessly.
Field Summary |
---|
Fields inherited from class fang.Tracker |
---|
random |
Constructor Summary | |
---|---|
CompositeTracker(Tracker... tracker)
makes the CompositeTracker and adds all of the arguments to the list of trackers |
Method Summary | |
---|---|
void |
addTracker(Tracker tracker)
adds one tracker to compose. |
void |
advanceTime(double timePassed)
Advancing the time of all the trackers contained in this tracker. |
Tracker[] |
getAllTrackers()
gets all of the Trackers in this collection of Trackers |
double |
getRotationAddition()
composes the trackers' rotation additions |
double |
getScaleFactor()
composes the trackers' scaling factors |
Coordinate |
getTranslation()
composes the trackers' translations |
void |
removeTracker(Tracker tracker)
removes the tracker from the list of trackers composed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeTracker(Tracker... tracker)
tracker
- the trackers to composeMethod Detail |
---|
public Tracker[] getAllTrackers()
public void addTracker(Tracker tracker)
tracker
- the tracker to composepublic void removeTracker(Tracker tracker)
tracker
- the tracker to removepublic Coordinate getTranslation()
getTranslation
in class Tracker
public double getScaleFactor()
getScaleFactor
in class Tracker
public double getRotationAddition()
getRotationAddition
in class Tracker
public void advanceTime(double timePassed)
advanceTime
in class Tracker
timePassed
- the duration of time
since the last call to advanceTime
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |