Project

General

Profile

Download (4.2 KB) Statistics
| Branch: | Revision:

library / src / main / java / org / distorted / library / effect / EffectName.java @ da9b3f07

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2016 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Distorted.                                                               //
5
//                                                                                               //
6
// Distorted is free software: you can redistribute it and/or modify                             //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Distorted is distributed in the hope that it will be useful,                                  //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Distorted.  If not, see <http://www.gnu.org/licenses/>.                            //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
package org.distorted.library.effect;
21

    
22
///////////////////////////////////////////////////////////////////////////////////////////////////
23
/**
24
 * Names of Effects one can add to the DistortedEffects queues.
25
 * <p>
26
 * Effect's 'Type' is one of the constants defined in {@link EffectType}.
27
 */
28

    
29
public enum EffectName
30
  {
31
  // EFFECT NAME /////// EFFECT TYPE
32
  // MATRIX EFFECTS
33
  ROTATE           ( EffectType.MATRIX ),
34
  QUATERNION       ( EffectType.MATRIX ),
35
  MOVE             ( EffectType.MATRIX ),
36
  SCALE            ( EffectType.MATRIX ),
37
  SHEAR            ( EffectType.MATRIX ),
38
  // add new Matrix effects here...
39
  // VERTEX EFFECTS
40
  DISTORT          ( EffectType.VERTEX ),
41
  DEFORM           ( EffectType.VERTEX ),
42
  SINK             ( EffectType.VERTEX ),
43
  PINCH            ( EffectType.VERTEX ),
44
  SWIRL            ( EffectType.VERTEX ),
45
  WAVE             ( EffectType.VERTEX ),
46
  // add new Vertex Effects here...
47
  // FRAGMENT EFFECTS
48
  ALPHA            ( EffectType.FRAGMENT ),
49
  SMOOTH_ALPHA     ( EffectType.FRAGMENT ),
50
  CHROMA           ( EffectType.FRAGMENT ),
51
  SMOOTH_CHROMA    ( EffectType.FRAGMENT ),
52
  BRIGHTNESS       ( EffectType.FRAGMENT ),
53
  SMOOTH_BRIGHTNESS( EffectType.FRAGMENT ),
54
  SATURATION       ( EffectType.FRAGMENT ),
55
  SMOOTH_SATURATION( EffectType.FRAGMENT ),
56
  CONTRAST         ( EffectType.FRAGMENT ),
57
  SMOOTH_CONTRAST  ( EffectType.FRAGMENT ),
58
  // add new Fragment effects here...
59
  // POSTPROCESSING EFFECTS.
60
  BLUR             ( EffectType.POSTPROCESS ),
61
  GLOW             ( EffectType.POSTPROCESS );
62
  // add new Postprocess effects here...
63

    
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65

    
66
  private final EffectType type;
67

    
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

    
70
  EffectName(EffectType type)
71
    {
72
    this.type = type;
73
    }
74

    
75
///////////////////////////////////////////////////////////////////////////////////////////////////
76

    
77
  static int size()
78
    {
79
    return values().length;
80
    }
81

    
82
///////////////////////////////////////////////////////////////////////////////////////////////////
83
// PUBLIC API
84
///////////////////////////////////////////////////////////////////////////////////////////////////
85
/**
86
 * Returns the Type of an individual Effect. For example, EffectName.ROTATION.getType() will
87
 * return EffectType.MATRIX.
88
 * @return type of the effect.
89
 */
90
  public EffectType getType()
91
    {
92
    return type;
93
    }
94
  }
95

    
(2-2/25)