Public Member Functions | |
TransformStorage | getData (long time) |
boolean | insertData (TransformStorage newData) |
TimeCache (long maxStorageTime, Frame parentFrame, Frame childFrame) | |
long | timeToNearestTransform (long time) |
Protected Member Functions | |
void | removeOldData () |
Protected Attributes | |
Frame | childFrame |
long | maxStorageTime |
Frame | parentFrame |
TreeMap< Long, TransformStorage > | storage |
Buffer in which transformations from one specific frame to another are stored, ordered in time.
Definition at line 41 of file TimeCache.java.
tfjava.TimeCache.TimeCache | ( | long | maxStorageTime, |
Frame | parentFrame, | ||
Frame | childFrame | ||
) | [inline] |
Class Constructor.
Definition at line 55 of file TimeCache.java.
TransformStorage tfjava.TimeCache.getData | ( | long | time | ) | [inline] |
Returns the transformation in this buffer at time point time (in nanoseconds); Uses interpolation or (forward or backward) extrapolation.
If only one transformation is available, this transformation is returned, regardless of how far back or ahead the queried time point is compared to the time stamp of this transformation.
Definition at line 85 of file TimeCache.java.
boolean tfjava.TimeCache.insertData | ( | TransformStorage | newData | ) | [inline] |
Inserts transformation newData in the buffer, while maintaining the time ordering.
Definition at line 65 of file TimeCache.java.
void tfjava.TimeCache.removeOldData | ( | ) | [inline, protected] |
Removes all transforms that are more than maxStorageTime older than the newest transform.
Definition at line 134 of file TimeCache.java.
long tfjava.TimeCache.timeToNearestTransform | ( | long | time | ) | [inline] |
Returns the absolute time difference to the nearest transform from the given time point, in nanoseconds.
Definition at line 122 of file TimeCache.java.
Frame tfjava.TimeCache.childFrame [protected] |
Reference to the child frame (target frame)
Definition at line 50 of file TimeCache.java.
long tfjava.TimeCache.maxStorageTime [protected] |
Maximum storage time, in nanoseconds
Definition at line 46 of file TimeCache.java.
Frame tfjava.TimeCache.parentFrame [protected] |
Reference to the parent frame (source frame)
Definition at line 48 of file TimeCache.java.
TreeMap<Long, TransformStorage> tfjava.TimeCache.storage [protected] |
Map containing the transformations, ordered in time
Definition at line 44 of file TimeCache.java.