Revision 2ef5dd9e
Added by Leszek Koltunski over 8 years ago
| src/main/java/org/distorted/library/effect/Effect.java | ||
|---|---|---|
| 142 | 142 |
|
| 143 | 143 |
mUnityDim[n] = l; |
| 144 | 144 |
|
| 145 |
mID = (mNextID++)<<EffectType.LENGTH + mType.ordinal();
|
|
| 145 |
mID = ((mNextID++)<<EffectType.LENGTH) + mType.ordinal();
|
|
| 146 | 146 |
} |
| 147 | 147 |
} |
| src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java | ||
|---|---|---|
| 23 | 23 |
import org.distorted.library.type.Data4D; |
| 24 | 24 |
import org.distorted.library.type.Dynamic3D; |
| 25 | 25 |
import org.distorted.library.type.Dynamic4D; |
| 26 |
import org.distorted.library.type.DynamicQuat; |
|
| 26 | 27 |
import org.distorted.library.type.Static3D; |
| 27 | 28 |
import org.distorted.library.type.Static4D; |
| 28 | 29 |
|
| ... | ... | |
| 45 | 46 |
{
|
| 46 | 47 |
mStatic0 = (Static4D)quaternion; |
| 47 | 48 |
} |
| 48 |
else if( quaternion instanceof Dynamic4D)
|
|
| 49 |
else if( quaternion instanceof DynamicQuat)
|
|
| 49 | 50 |
{
|
| 50 |
mDynamic0 = (Dynamic4D)quaternion;
|
|
| 51 |
mDynamic0 = (DynamicQuat)quaternion;
|
|
| 51 | 52 |
} |
| 52 | 53 |
|
| 53 | 54 |
if( center instanceof Static3D) |
| src/main/java/org/distorted/library/main/DistortedEffects.java | ||
|---|---|---|
| 478 | 478 |
{
|
| 479 | 479 |
long type = id&EffectType.MASK; |
| 480 | 480 |
|
| 481 |
if( type == EffectType.MATRIX.ordinal() ) return mM.abortAll(true);
|
|
| 482 |
if( type == EffectType.VERTEX.ordinal() ) return mV.abortAll(true);
|
|
| 483 |
if( type == EffectType.FRAGMENT.ordinal() ) return mF.abortAll(true);
|
|
| 484 |
// if( type == EffectType.POSTPROCESS.ordinal() ) return mP.abortAll(true);
|
|
| 481 |
if( type == EffectType.MATRIX.ordinal() ) return mM.removeById(id);
|
|
| 482 |
if( type == EffectType.VERTEX.ordinal() ) return mV.removeById(id);
|
|
| 483 |
if( type == EffectType.FRAGMENT.ordinal() ) return mF.removeById(id);
|
|
| 484 |
// if( type == EffectType.POSTPROCESS.ordinal() ) return mP.removeById(id);
|
|
| 485 | 485 |
|
| 486 | 486 |
return 0; |
| 487 | 487 |
} |
| src/main/java/org/distorted/library/main/EffectQueue.java | ||
|---|---|---|
| 157 | 157 |
return ret; |
| 158 | 158 |
} |
| 159 | 159 |
|
| 160 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 161 |
|
|
| 162 |
synchronized int removeById(long id) |
|
| 163 |
{
|
|
| 164 |
int ret = 0; |
|
| 165 |
|
|
| 166 |
for(int i=0; i<mNumEffects; i++) |
|
| 167 |
{
|
|
| 168 |
if( mEffects[i].getID() == id ) |
|
| 169 |
{
|
|
| 170 |
remove(i); |
|
| 171 |
i--; |
|
| 172 |
ret++; |
|
| 173 |
} |
|
| 174 |
} |
|
| 175 |
|
|
| 176 |
return ret; |
|
| 177 |
} |
|
| 178 |
|
|
| 160 | 179 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 161 | 180 |
|
| 162 | 181 |
synchronized int removeEffect(Effect effect) |
Also available in: Unified diff
Bugfixes for the recent 'Effect classes' API change.