Project

General

Profile

« Previous | Next » 

Revision 26a4e5f6

Added by Leszek Koltunski almost 7 years ago

Reorganize the way we add and remove all Effects (do it through DistortedMaster and is POSTPROCES - adjust Bucket and SORT Nodes).

Buggy: removing effects does not work.

View differences:

src/main/java/org/distorted/library/main/DistortedNode.java
335 335
    mParent = null;
336 336
    }
337 337

  
338
///////////////////////////////////////////////////////////////////////////////////////////////////
339

  
340
  void sort()
341
    {
342
    if( mParent!=null )
343
      {
344
      mParent.mChildren.remove(this);
345
      DistortedMaster.addSorted(mParent.mChildren,this);
346
      }
347
    else if( mSurfaceParent!=null )
348
      {
349
      ArrayList<DistortedNode> children = mSurfaceParent.getChildren();
350
      children.remove(this);
351
      DistortedMaster.addSorted(children,this);
352
      }
353
    }
354

  
338 355
///////////////////////////////////////////////////////////////////////////////////////////////////
339 356
// PUBLIC API
340 357
///////////////////////////////////////////////////////////////////////////////////////////////////
......
376 393
      mData = new NodeData(++mNextNodeID,list);
377 394
      mMapNodeID.put(list, mData);
378 395
      }
396

  
397
    mEffects.newNode(this);
379 398
    }
380 399

  
381 400
///////////////////////////////////////////////////////////////////////////////////////////////////  
......
456 475
      mData = new NodeData(++mNextNodeID,list);
457 476
      mMapNodeID.put(list, mData);
458 477
      }
478

  
479
    mEffects.newNode(this);
459 480
    }
460 481

  
461 482
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff