Revision e1e275c1
Added by Leszek Koltunski over 9 years ago
| src/main/java/org/distorted/library/EffectTypes.java | ||
|---|---|---|
| 1 | 1 |
package org.distorted.library; |
| 2 | 2 |
|
| 3 | 3 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 4 |
|
|
| 4 |
/** |
|
| 5 |
* Types of Effects one can apply to DistortedObjects. |
|
| 6 |
* <p> |
|
| 7 |
* Each effect type goes to an independent queue; the queues get executed one-by-one |
|
| 8 |
* and are each a class descendant from EffectQueue. |
|
| 9 |
*/ |
|
| 5 | 10 |
public enum EffectTypes |
| 6 | 11 |
{
|
| 7 |
MATRIX ( 0x1 ), // values will be bitwise ORed and ANDed |
|
| 8 |
VERTEX ( 0x2 ), // so need to be 1,2,4,8... |
|
| 9 |
FRAGMENT ( 0x4 ), // |
|
| 10 |
OTHER ( 0x8 ); // |
|
| 12 |
/** |
|
| 13 |
* Matrix effects - i.e. effect that change the ModelView matrix. Rotations, Moves, Shears, Scales. |
|
| 14 |
*/ |
|
| 15 |
MATRIX ( 0x1 ), // we will need to perform bitwise operations on those - so keep the values 1,2,4,8... |
|
| 16 |
/** |
|
| 17 |
* Vertex Effects - i.e. those that get executed in the Vertex shader. Generally various distortions |
|
| 18 |
* of the vertices. |
|
| 19 |
*/ |
|
| 20 |
VERTEX ( 0x2 ), |
|
| 21 |
/** |
|
| 22 |
* Fragment Effects - executed in the Fragment shader. Changes of color, hue, transparency levels, etc. |
|
| 23 |
*/ |
|
| 24 |
FRAGMENT ( 0x4 ), |
|
| 25 |
/** |
|
| 26 |
* effects that did not belong to anywhere else - currently saving the contents of underlying Surface |
|
| 27 |
* to a PNG or a MP4 file. |
|
| 28 |
*/ |
|
| 29 |
OTHER ( 0x8 ); |
|
| 11 | 30 |
|
| 12 | 31 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 13 | 32 |
|
| 14 | 33 |
final static int LENGTH = values().length; // The number of effect types. |
| 15 | 34 |
final static int MASK= (1<<LENGTH)-1; // Needed when we do bitwise operations on Effect Types. |
| 16 | 35 |
|
| 17 |
public final int type;
|
|
| 36 |
final int type; |
|
| 18 | 37 |
|
| 19 | 38 |
EffectTypes(int type) |
| 20 | 39 |
{
|
Also available in: Unified diff
Javadoc stuff.