Project

General

Profile

« Previous | Next » 

Revision bc208a9c

Added by Leszek Koltunski almost 4 years ago

Introduce 'tags' (soon to be renamed to 'associations') to Mesh and VertexEffect.
A 'tag' is a way to associate a Vertex Effect only to a subgroup of a given Mesh's vertices (more precisely, only to an arbitrary subset of its Components)

View differences:

src/main/java/org/distorted/library/effectqueue/EffectQueue.java
51 51
  long[] mCurrentDuration;
52 52
  Effect[] mEffects;
53 53
  int[] mName;
54
  int[] mTag;
54 55
  long mTime;
55 56

  
56 57
  private static int[] mMax = new int[EffectType.LENGTH];
......
141 142
        mCurrentDuration = new long[max];
142 143
        mEffects         = new Effect[max];
143 144
        mName            = new int[max];
145
        mTag             = new int[max];
144 146
        }
145 147

  
146 148
      for(int i=0; i<mNumEffects; i++ )
......
148 150
        mEffects[i]         = source.mEffects[i];
149 151
        mCurrentDuration[i] = source.mCurrentDuration[i];
150 152
        mName[i]            = source.mName[i];
153
        mTag[i]             = source.mTag[i];
151 154
        }
152 155
      }
153 156
    }
......
276 279
      mEffects[j]         = mEffects[j+1];
277 280
      mCurrentDuration[j] = mCurrentDuration[j+1];
278 281
      mName[j]            = mName[j+1];
282
      mTag[j]             = mTag[j+1];
279 283
      }
280 284

  
281 285
    mEffects[mNumEffects] = null;
......
426 430
                       mCurrentDuration = new long[max];
427 431
                       mEffects         = new Effect[max];
428 432
                       mName            = new int[max];
433
                       mTag             = new int[max];
429 434
                       }
430 435
                     mCreated = true;
431 436

  
......
439 444
                         mCurrentDuration[mNumEffects] = 0;
440 445
                         mEffects[mNumEffects] = job.effect;
441 446
                         mName[mNumEffects] = job.effect.getName().ordinal();
447
                         mTag[mNumEffects]  = job.effect.getTag();
442 448

  
443 449
                         mNumEffects++;
444 450
                         changed = true;
......
450 456
                           mCurrentDuration[j] = mCurrentDuration[j-1];
451 457
                           mEffects[j]         = mEffects[j-1];
452 458
                           mName[j]            = mName[j-1];
459
                           mTag[j]             = mTag[j-1];
453 460
                           }
454 461

  
455 462
                         mCurrentDuration[position] = 0;
456 463
                         mEffects[position] = job.effect;
457 464
                         mName[position] = job.effect.getName().ordinal();
465
                         mTag[position]  = job.effect.getTag();
458 466

  
459 467
                         mNumEffects++;
460 468
                         changed = true;

Also available in: Unified diff