Project

General

Profile

« Previous | Next » 

Revision a418b421

Added by Leszek Koltunski almost 7 years ago

Progress with the last 2 APPs.

View differences:

src/main/java/org/distorted/examples/matrix3d/Matrix3DEffect.java
25 25

  
26 26
import org.distorted.examples.R;
27 27
import org.distorted.library.effect.EffectName;
28
import org.distorted.library.effect.EffectType;
28 29
import org.distorted.library.main.DistortedEffects;
29 30
import org.distorted.library.type.Dynamic1D;
30 31
import org.distorted.library.type.Dynamic2D;
......
204 205
      case 1: mInter[0] = 50;
205 206
      }
206 207

  
207
    if( mName==EffectNames.ROTATE || mName==EffectNames.QUATERNION )
208
    if( mName==EffectName.ROTATE || mName==EffectName.QUATERNION )
208 209
      {
209 210
      mInter[1]= 100;
210 211
      }
211
    if( mName==EffectNames.SCALE )
212
    if( mName==EffectName.SCALE )
212 213
      {
213 214
      mInter[0]= 60;
214 215
      mInter[1]= 60;
......
307 308
    float factorX = act.getWidth() / 100.0f;
308 309
    float factorY = act.getHeight()/ 100.0f;
309 310

  
310
    int deduct = (mName.getType() == EffectTypes.VERTEX ? 50:0);
311
    int deduct = (mName.getType() == EffectType.VERTEX ? 50:0);
311 312

  
312 313
    float  x = (mInterRegion[0]-deduct)*factorX;
313 314
    float  y = (mInterRegion[1]-deduct)*factorY;
......
341 342

  
342 343
///////////////////////////////////////////////////////////////////////////////////////////////////
343 344

  
344
  Matrix3DEffect(EffectNames name, Matrix3DActivity act)
345
  Matrix3DEffect(EffectName name, Matrix3DActivity act)
345 346
    {
346 347
    mAct = new WeakReference<>(act);
347 348
    mName = name;
......
373 374
               mSta3 = new Static3D(0,0,0);
374 375
               mDyn3.add(mSta3);
375 376
               break;
376
      case 4 : if( mName == EffectNames.ROTATE || mName == EffectNames.QUATERNION )
377
      case 4 : if( mName == EffectName.ROTATE || mName == EffectName.QUATERNION )
377 378
                 {
378 379
                 mDyn4 = new Dynamic4D();
379 380
                 mSta4 = new Static4D(0,0,0,0);

Also available in: Unified diff