Public Member Functions | Protected Member Functions | Protected Attributes
tfjava.TimeCache Class Reference

List of all members.

Public Member Functions

TransformStorage getData (long time)
boolean insertData (TransformStorage newData)
 TimeCache (long maxStorageTime, Frame parentFrame, Frame childFrame)
boolean timeInBufferRange (long time)
long timeToNearestTransform (long time)

Protected Member Functions

void removeOldData ()

Protected Attributes

Frame childFrame
long maxStorageTime
Frame parentFrame
TreeMap< Long, TransformStoragestorage

Detailed Description

Buffer in which transformations from one specific frame to another are stored, ordered in time.

Author:
Sjoerd van den Dries
Version:
Feb 28, 2011

Definition at line 41 of file TimeCache.java.


Constructor & Destructor Documentation

tfjava.TimeCache.TimeCache ( long  maxStorageTime,
Frame  parentFrame,
Frame  childFrame 
) [inline]

Class Constructor.

Definition at line 55 of file TimeCache.java.


Member Function Documentation

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.

boolean tfjava.TimeCache.timeInBufferRange ( long  time) [inline]

Check whether timepoint 'time' is between the oldest and newest entries in tbe buffer.

Parameters:
timeTime point to be checked
Returns:
true if 'time' is between the oldest and newest buffer entry

Definition at line 149 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.


Member Data Documentation

Reference to the child frame (target frame)

Definition at line 50 of file TimeCache.java.

Maximum storage time, in nanoseconds

Definition at line 46 of file TimeCache.java.

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.


The documentation for this class was generated from the following file:


tfjava
Author(s): Sjoerd van den Dries
autogenerated on Sun Oct 5 2014 22:54:19