Advertisement
Guest User

fpp updates

a guest
Dec 17th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.16 KB | None | 0 0
  1. # This patch file was generated by NetBeans IDE
  2. # Following Index: paths are relative to: C:\Windows.old\Users\Toucher\Documents\jMonkeyProjects\trunk\engine\src\core\com\jme3\post
  3. # This patch can be applied using context Tools: Patch action on respective folder.
  4. # It uses platform neutral UTF-8 encoding and \n newlines.
  5. # Above lines and this line are ignored by the patching process.
  6. Index: FilterPostProcessor.java
  7. --- FilterPostProcessor.java Base (BASE)
  8. +++ FilterPostProcessor.java Locally Modified (Based On LOCAL)
  9. @@ -113,6 +113,25 @@
  10.      }
  11.  
  12.      /**
  13. +     * inserts a filter into the filters list, at the given index.
  14. +     * @param index position in the filter list to insert the filter
  15. +     * @param filter the filter to insert
  16. +     */
  17. +    public void addFilter(int index, Filter filter) {
  18. +        if (filter == null) {
  19. +            throw new IllegalArgumentException("Filter cannot be null.");
  20. +        }
  21. +        filters.add(index, filter);
  22. +
  23. +        if (isInitialized()) {
  24. +            initFilter(filter, viewPort);
  25. +        }
  26. +
  27. +        setFilterState(filter, filter.isEnabled());
  28. +    }
  29. +    
  30. +
  31. +    /**
  32.       * removes this filters from the filters list
  33.       * @param filter
  34.       */
  35. @@ -125,6 +144,18 @@
  36.          updateLastFilterIndex();
  37.      }
  38.  
  39. +    /**
  40. +     * removes a filter from the filters list at the given index
  41. +     * @param index of filter
  42. +     * @return filter the removed filter
  43. +     */
  44. +    public Filter removeFilter(int index) {
  45. +        Filter removed = filters.remove(index);
  46. +        removed.cleanup(renderer);
  47. +        updateLastFilterIndex();
  48. +        return removed;
  49. +    }
  50. +
  51.      public Iterator<Filter> getFilterIterator() {
  52.          return filters.iterator();
  53.      }
  54. @@ -535,6 +566,15 @@
  55.      }
  56.      
  57.      /**
  58. +     * returns the filter from the filter list at the given index
  59. +     * @param index
  60. +     * @return the filter at that index in the filter list
  61. +     */
  62. +    public Filter getFilter(int index) {        
  63. +        return filters.get(index);
  64. +    }
  65. +    
  66. +    /**
  67.       * returns an unmodifiable version of the filter list.
  68.       * @return the filters list
  69.       */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement