Revision 476bbc81
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/library/EffectNames.java | ||
---|---|---|
1 | 1 |
package org.distorted.library; |
2 | 2 |
|
3 | 3 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
4 |
|
|
5 |
enum EffectNames |
|
4 |
/** |
|
5 |
* Names of Effects one can apply to DistortedObjects. |
|
6 |
*/ |
|
7 |
public enum EffectNames |
|
6 | 8 |
{ |
7 | 9 |
// EFFECT NAME /////// EFFECT TYPE ////////////// UNITY ///////////////////////// |
8 | 10 |
|
... | ... | |
83 | 85 |
} |
84 | 86 |
|
85 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
86 |
|
|
87 |
public EffectTypes getType() |
|
88 |
{ |
|
89 |
return type; |
|
90 |
} |
|
91 |
|
|
92 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
93 |
// yes, I know we could have used values(i) |
|
88 |
// yes, I know we could have used values(i) but that allocates a new copy each time! |
|
94 | 89 |
|
95 | 90 |
static EffectTypes getType(int ordinal) |
96 | 91 |
{ |
... | ... | |
146 | 141 |
|
147 | 142 |
return false; |
148 | 143 |
} |
149 |
} |
|
150 | 144 |
|
151 | 145 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
152 |
|
|
146 |
// PUBLIC API |
|
147 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
148 |
/** |
|
149 |
* Returns the Type of an individual Effect. For example, EffectNames.ROTATION.getType() will |
|
150 |
* return EffectTypes.MATRIX. |
|
151 |
* @return type of the effect. |
|
152 |
*/ |
|
153 |
public EffectTypes getType() |
|
154 |
{ |
|
155 |
return type; |
|
156 |
} |
|
157 |
} |
Also available in: Unified diff
Bugfix for removeByType