Project

General

Profile

« Previous | Next » 

Revision c45c2ab1

Added by Leszek Koltunski about 5 years ago

Minor improvements in the Dynamics.

View differences:

src/main/java/org/distorted/library/type/DynamicQuat.java
115 115
    }
116 116

  
117 117
///////////////////////////////////////////////////////////////////////////////////////////////////
118

  
119 118
/**
120
 * Default constructor.
119
 * Constructor setting the speed of interpolation and the number of revolutions.
121 120
 *
122
 * @param duration number of milliseconds it takes to do a full loop/path from first vector to the
123
 *                 last and back to the first
124
 * @param count    number of loops/paths we will do; mCount = 1.5 means we go from the first vector
125
 *                 to the last, back to first, and to the last again.
121
 * What constitutes 'one revolution' depends on the MODE:
122
 * {@link Dynamic#MODE_LOOP}, {@link Dynamic#MODE_PATH} or {@link Dynamic#MODE_JUMP}.
123
 *
124
 * @param duration number of milliseconds it takes to do one revolution.
125
 * @param count    number of revolutions we will do. Count<=0 means 'infinite'.
126 126
 */
127 127
  public DynamicQuat(int duration, float count)
128 128
    {
......
134 134
    mDuration  = duration;
135 135
    mCount     = count;
136 136
    mLastPos   = -1;
137
    mAccessMode= ACCESS_RANDOM;
137
    mAccessType = ACCESS_TYPE_RANDOM;
138 138
    mDimension = 4;
139 139
    }
140 140

  
......
320 320
 * 
321 321
 * @param buffer Float buffer we will write the resulting Static4D to.
322 322
 * @param offset Offset in the buffer where to write the result.
323
 * @param time Time of interpolation. Time=0.0 would return the first Point, Time=0.5 - the last,
324
 *             time=1.0 - the first again, and time 0.1 would be 1/5 of the way between the first and the last Points.
325
 */    
323
 * @param time   Time of interpolation. Time=0.0 is the beginning of the first revolution, time=1.0 - the end
324
 *               of the first revolution, time=2.5 - the middle of the third revolution.
325
 *               What constitutes 'one revolution' depends on the MODE:
326
 *               {@link Dynamic#MODE_LOOP}, {@link Dynamic#MODE_PATH} or {@link Dynamic#MODE_JUMP}.
327
 **/
326 328
  synchronized void interpolate(float[] buffer, int offset, float time)
327 329
    {  
328 330
    switch(numPoints)

Also available in: Unified diff