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/effects3d/Effects3DEffect.java
24 24
import android.widget.TextView;
25 25

  
26 26
import org.distorted.examples.R;
27
import org.distorted.library.effect.EffectName;
28
import org.distorted.library.effect.EffectType;
27 29
import org.distorted.library.main.DistortedEffects;
28 30
import org.distorted.library.type.Dynamic1D;
29 31
import org.distorted.library.type.Dynamic2D;
......
44 46
  {
45 47
  private WeakReference<Effects3DActivity> mAct;
46 48

  
47
  private EffectNames mName;
49
  private EffectName mName;
48 50
  private int[] mInter;
49 51
  private int[] mInterRegion;
50 52
  private int[] mInterCenter;
......
203 205
      case 1: mInter[0] = 50;
204 206
      }
205 207

  
206
    if( mName==EffectNames.ROTATE || mName==EffectNames.QUATERNION ) mInter[1]= 100;
208
    if( mName==EffectName.ROTATE || mName==EffectName.QUATERNION ) mInter[1]= 100;
207 209
    }
208 210

  
209 211
///////////////////////////////////////////////////////////////////////////////////////////////////
......
297 299
    float factorX = act.getWidth() / 100.0f;
298 300
    float factorY = act.getHeight()/ 100.0f;
299 301

  
300
    int deduct = (mName.getType() == EffectTypes.VERTEX ? 50:0);
302
    int deduct = (mName.getType() == EffectType.VERTEX ? 50:0);
301 303

  
302 304
    float  x = (mInterRegion[0]-deduct)*factorX;
303 305
    float  y = (mInterRegion[1]-deduct)*factorY;
......
331 333

  
332 334
///////////////////////////////////////////////////////////////////////////////////////////////////
333 335

  
334
  Effects3DEffect(EffectNames name, Effects3DActivity act)
336
  Effects3DEffect(EffectName name, Effects3DActivity act)
335 337
    {
336 338
    mAct = new WeakReference<>(act);
337 339
    mName = name;
......
363 365
               mSta3 = new Static3D(0,0,0);
364 366
               mDyn3.add(mSta3);
365 367
               break;
366
      case 4 : if( mName == EffectNames.ROTATE || mName == EffectNames.QUATERNION )
368
      case 4 : if( mName == EffectName.ROTATE || mName == EffectName.QUATERNION )
367 369
                 {
368 370
                 mDyn4 = new Dynamic4D();
369 371
                 mSta4 = new Static4D(0,0,0,0);
......
636 638
      {
637 639
      Effects3DActivity act = mAct.get();
638 640

  
639
      boolean show = (mName.getType()==EffectTypes.VERTEX);
641
      boolean show = (mName.getType()==EffectType.VERTEX);
640 642
      boolean showR= (show && act.getShowRegion());
641 643
      boolean showC= (show && act.getShowCenter());
642 644

  

Also available in: Unified diff