Project

General

Profile

« Previous | Next » 

Revision e25d0dde

Added by Leszek Koltunski over 8 years ago

Additional Javadoc stuff.

View differences:

src/main/java/org/distorted/library/EffectNames.java
23 23
/**
24 24
 * Names of Effects one can apply to DistortedObjects.
25 25
 * <p>
26
 * Effect's 'unity' is a set of values which
26
 * Effect's 'Type' is one of the constants defined in {@see EffectTypes}.
27
 * </p>
28
 * <p>
29
 * Effect's 'Uniforms' are a vector of 7 (matrix effects) 9 (vertex) or 8 (fragment) floats, which
30
 * together form full information how to compute a given effect.
31
 * Typically, some of those values will be Interpolated in CPU (by one of the 'EffectQueueX.compute()'
32
 * methods) and the effect of such Interpolation sent to the Shaders.
33
 * </p>
34
 * <p>
35
 * Effect's 'Unity' is such a particular vector of its 'interpolated values' which makes the
36
 * effect NULL. For example, if the effect is 'MOVE' by a 3-dimensional vector, then a 'NULL
37
 * MOVE' is a MOVE by vector (0,0,0), thus (0,0,0) is the unity of the MOVE effect.
38
 * This is used by the EffectQueue classes to decide if the final form of the Effect is NULL - and
39
 * thus if it can safely be removed from Effect Queues without affecting the visual in any way.
40
 * </p>
27 41
 */
28 42
public enum EffectNames
29 43
  {
......
35 49
 /**
36 50
   * Rotate the whole Object around a center point (in angle-axis notation).
37 51
   * <p>
38
   * 7 Uniforms: (angle,axisX,axisY,axisZ,centerX,centerY,centerZ)
52
   * Uniforms: (angle,axisX,axisY,axisZ,centerX,centerY,centerZ)
39 53
   * Unity: angle==0
40 54
   */
41 55
  ROTATE           ( EffectTypes.MATRIX  ,   new float[] {0.0f}           ),
42 56
 /**
43 57
   * Rotate the whole Object around a center point (in quaternion notation).
44 58
   * <p>
45
   * 7 Uniforms: (quatX,quatY,quatZ,quatW,centerX,centerY,centerZ)
59
   * Uniforms: (quatX,quatY,quatZ,quatW,centerX,centerY,centerZ)
46 60
   * Unity: (quatX,quatY,quatZ) = (0,0,0)
47 61
   */
48 62
  QUATERNION       ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
49 63
 /**
50 64
   * Move the whole Object by a vector.
51 65
   * <p>
52
   * 7 Uniforms: (vectorX,vectorY,vectorZ,UNUSED,UNUSED,UNUSED,UNUSED)
66
   * Uniforms: (vectorX,vectorY,vectorZ,UNUSED,UNUSED,UNUSED,UNUSED)
53 67
   * Unity: (vectorX,vectorY,vectorZ) = (0,0,0)
54 68
   */
55 69
  MOVE             ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
56 70
 /**
57 71
   * Scale the whole Object independently in all 3 dimensions.
58 72
   * <p>
59
   * 7 Uniforms: (scaleX,scaleY,scaleZ,UNUSED,UNUSED,UNUSED,UNUSED)
73
   * Uniforms: (scaleX,scaleY,scaleZ,UNUSED,UNUSED,UNUSED,UNUSED)
60 74
   * Unity: (scaleX,scaleY,scaleZ) = (1,1,1)
61 75
   */
62 76
  SCALE            ( EffectTypes.MATRIX  ,   new float[] {1.0f,1.0f,1.0f} ),
63 77
 /**
64 78
   * Shear the whole Object in 3 dimensions around a center point.
65 79
   * <p>
66
   * 7 Uniforms: (shearX,shearY,shearZ,UNUSED,centerX,centerY,centerZ)
80
   * Uniforms: (shearX,shearY,shearZ,UNUSED,centerX,centerY,centerZ)
67 81
   * Unity:  (shearX,shearY,shearZ) = (0,0,0)
68 82
   */
69 83
  SHEAR            ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
......
76 90
 /**
77 91
   * Apply a 3D vector of force to area around a point on the surface of the Object.
78 92
   * <p>
79
   * 9 Uniforms: (forceX,forceY,forceZ,regionX,regionY,regionRX,regionRY,centerX,centerY)
93
   * Uniforms: (forceX,forceY,forceZ,regionX,regionY,regionRX,regionRY,centerX,centerY)
80 94
   * Unity: (forceX,forceY,forceZ) = (0,0,0)
81 95
   */
82 96
  DISTORT          ( EffectTypes.VERTEX  ,   new float[] {0.0f,0.0f,0.0f} ),      // keep this the first VERT effect (reason: getType)
83 97
 /**
84 98
   * Deform the whole Object by applying a 2D vector of force to a center point.
85 99
   * <p>
86
   * 9 Uniforms: (forceX,forceY,UNUSED,UNUSED,UNUSED,UNUSED,UNUSED,centerX,centerY)
100
   * Uniforms: (forceX,forceY,UNUSED,UNUSED,UNUSED,UNUSED,UNUSED,centerX,centerY)
87 101
   * Unity: (forceX,forceY) = (0,0)
88 102
   */
89 103
  DEFORM           ( EffectTypes.VERTEX  ,   new float[] {0.0f,0.0f}      ),
90 104
 /**
91 105
   * Pull (or push away) all points around a center point to (from) it.
92 106
   * <p>
93
   * 9 Uniforms: (sinkFactor,UNUSED,UNUSED,regionX,regionY,regionRX,regionRY,centerX,centerY)
107
   * Uniforms: (sinkFactor,UNUSED,UNUSED,regionX,regionY,regionRX,regionRY,centerX,centerY)
94 108
   * Unity: sinkFactor = 1
95 109
   */
96 110
  SINK             ( EffectTypes.VERTEX  ,   new float[] {1.0f}           ),
97 111
 /**
98 112
   * Smoothly rotate a limited area around a center point.
99 113
   * <p>
100
   * 9 Uniforms: (swirlAngle,UNUSED,UNUSED,regionX,regionY,regionRX,regionRY,centerX,centerY)
114
   * Uniforms: (swirlAngle,UNUSED,UNUSED,regionX,regionY,regionRX,regionRY,centerX,centerY)
101 115
   * Unity: swirlAngle = 0
102 116
   */
103 117
  SWIRL            ( EffectTypes.VERTEX  ,   new float[] {0.0f}           ),
......
109 123
 /**
110 124
   * Create square-shaped macroblocks.
111 125
   * <p>
112
   * 8 Uniforms: (macroblockSize,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
126
   * Uniforms: (macroblockSize,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
113 127
   * Unity: macroblockSize = 1
114 128
   */
115 129
  MACROBLOCK       ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),      // keep this the first FRAG effect (reason: getType)
116 130
 /**
117 131
   * Make a given Region (partially) transparent.
118 132
   * <p>
119
   * 8 Uniforms: (transparencyLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
133
   * Uniforms: (transparencyLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
120 134
   * Unity: transparencyLevel = 1
121 135
   */
122 136
  ALPHA            ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
124 138
   * Make a given Region (partially) transparent.
125 139
   * Effect smoothly fades towards the edges of the region.
126 140
   * <p>
127
   * 8 Uniforms: (transparencyLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
141
   * Uniforms: (transparencyLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
128 142
   * Unity: transparencyLevel = 1
129 143
   */
130 144
  SMOOTH_ALPHA     ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
131 145
 /**
132 146
   * Blend current color in the texture with a given color.
133 147
   * <p>
134
   * 8 Uniforms: (blendLevel,colorR,colorG,colorB, regionX, regionY, regionRX, regionRY)
148
   * Uniforms: (blendLevel,colorR,colorG,colorB, regionX, regionY, regionRX, regionRY)
135 149
   * Unity: blendLevel = 0
136 150
   */
137 151
  CHROMA           ( EffectTypes.FRAGMENT,   new float[] {0.0f}           ),
138 152
 /**
139 153
   * Smoothly blend current color in the texture with a given color.
140 154
   * <p>
141
   * 8 Uniforms: (blendLevel,colorR,colorG,colorB, regionX, regionY, regionRX, regionRY)
155
   * Uniforms: (blendLevel,colorR,colorG,colorB, regionX, regionY, regionRX, regionRY)
142 156
   * Unity: blendLevel = 0
143 157
   */
144 158
  SMOOTH_CHROMA    ( EffectTypes.FRAGMENT,   new float[] {0.0f}           ),
145 159
 /**
146 160
   * Change brightness level of a given Region.
147 161
   * <p>
148
   * 8 Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
162
   * Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
149 163
   * Unity: brightnessLevel = 1
150 164
   */
151 165
  BRIGHTNESS       ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
152 166
 /**
153 167
   * Smoothly change brightness level of a given Region.
154 168
   * <p>
155
   * 8 Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
169
   * Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
156 170
   * Unity: brightnessLevel = 1
157 171
   */
158 172
  SMOOTH_BRIGHTNESS( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
159 173
 /**
160 174
   * Change saturation level of a given Region.
161 175
   * <p>
162
   * 8 Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
176
   * Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
163 177
   * Unity: saturationLevel = 1
164 178
   */
165 179
  SATURATION       ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
166 180
 /**
167 181
   * Smoothly change saturation level of a given Region.
168 182
   * <p>
169
   * 8 Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
183
   * Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
170 184
   * Unity: saturationLevel = 1
171 185
   */
172 186
  SMOOTH_SATURATION( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
173 187
 /**
174 188
   * Change contrast level of a given Region.
175 189
   * <p>
176
   * 8 Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
190
   * Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
177 191
   * Unity: contrastLevel = 1
178 192
   */
179 193
  CONTRAST         ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
180 194
 /**
181 195
   * Smoothly change contrast level of a given Region.
182 196
   * <p>
183
   * 8 Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
197
   * Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
184 198
   * Unity: contrastLevel = 1
185 199
   */
186 200
  SMOOTH_CONTRAST  ( EffectTypes.FRAGMENT,   new float[] {1.0f}           );

Also available in: Unified diff