Project

General

Profile

« Previous | Next » 

Revision 9dacabea

Added by Leszek Koltunski over 4 years ago

library: Fix DynamicQuat
cube app: progress with ScrambleEffects

View differences:

src/main/java/org/distorted/library/type/Dynamic1D.java
440 440
                if( cacheDirty ) recomputeCache();  // recompute cache if we have added or remove vectors since last computation
441 441
                else if( mSegment!= segment )       // ...or if we have just passed a vector and the vector we are currently flying to has changed
442 442
                  {
443
                  int vecNext;
444

  
445
                  switch(mMode)
446
                    {
447
                    case MODE_LOOP: vecNext = vecCurr==numPoints-1 ? 0:vecCurr+1;
448
                                    break;
449
                    case MODE_PATH: if( t<=0.5f ) vecNext = vecCurr==numPoints-1 ? numPoints-2: vecCurr+1;
450
                                    else          vecNext = vecCurr==0 ? 1 : vecCurr-1;
451
                                    break;
452
                    case MODE_JUMP: vecNext = vecCurr==numPoints-1 ? 1:vecCurr+1;
453
                                    break;
454
                    default       : vecNext = 0;
455
                    }
456
              
443
                  int vecNext = getNext(vecCurr,t);
457 444
                  next = vv.elementAt(vecNext);
458 445
                  tmp2 = vc.elementAt(vecNext);
459 446
              

Also available in: Unified diff