com.threerings.opengl.effect
Class PositionHistory

java.lang.Object
  extended by com.threerings.opengl.effect.PositionHistory

public final class PositionHistory
extends Object

Stores all of the positions occupied by a particle up to a maximum interval and provides a means of retrieving an interpolated historical position.


Constructor Summary
PositionHistory()
           
 
Method Summary
 Vector3f get(float t, Vector3f result)
          Computes the position at some point in the past.
 void init(Vector3f initial, Transform3D transform)
          (Re)initializes the history.
 void record(Vector3f position, float elapsed, float length)
          Records a position occupied by the particle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PositionHistory

public PositionHistory()
Method Detail

init

public void init(Vector3f initial,
                 Transform3D transform)
(Re)initializes the history.

Parameters:
initial - the initial position.
transform - the transform to apply to new entries, or null for none.

record

public void record(Vector3f position,
                   float elapsed,
                   float length)
Records a position occupied by the particle.


get

public Vector3f get(float t,
                    Vector3f result)
Computes the position at some point in the past.

Parameters:
t - the time parameter: zero for the oldest location, one for the newest.


Copyright © 2011. All Rights Reserved.