Project

General

Profile

« Previous | Next » 

Revision 7bf107f7

Added by Leszek Koltunski almost 8 years ago

Some more progress with porting apps to new VERTEX API.

View differences:

src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
34 34
import org.distorted.library.Distorted;
35 35
import org.distorted.library.DistortedBitmap;
36 36
import org.distorted.library.EffectTypes;
37
import org.distorted.library.type.Dynamic3D;
37 38
import org.distorted.library.type.Static2D;
38 39
import org.distorted.library.type.Static3D;
39 40
import org.distorted.library.type.Static4D;
......
65 66

  
66 67
  private Static2D pLeft, pRight;
67 68
  private Static4D rLeft, rRight;
68
  private Static3D vLeft, vRight;
69

  
70
  private Dynamic3D dLeft, dRight;
69 71

  
70 72
  SurfaceView mView;
71 73

  
......
82 84
    rLeft = new Static4D(-10,-10,25,25);
83 85
    rRight= new Static4D( 10, -5,25,25);
84 86

  
85
    vLeft = new Static3D(-20,-20,0);
86
    vRight= new Static3D( 20,-10,0);
87
    dLeft = new Dynamic3D();
88
    dRight= new Dynamic3D();
89

  
90
    dLeft.setDuration(1000);
91
    dRight.setDuration(1000);
92

  
93
    dLeft.setCount(0);
94
    dRight.setCount(0);
95

  
96
    dLeft.add( new Static3D(  0,  0,0) );
97
    dLeft.add( new Static3D(-20,-20,0) );
98

  
99
    dRight.add( new Static3D(  0,  0,0) );
100
    dRight.add( new Static3D( 20,-10,0) );
87 101
    }
88 102

  
89 103
///////////////////////////////////////////////////////////////////////////////////////////////////
......
181 195
      }
182 196

  
183 197
    monaLisa = new DistortedBitmap(bmp, 10);
184
    monaLisa.distort( vLeft, rLeft , pLeft, 1000, 0);
185
    monaLisa.distort(vRight, rRight, pRight,1000, 0);
198
    monaLisa.distort( dLeft, pLeft , rLeft );
199
    monaLisa.distort(dRight, pRight, rRight);
186 200

  
187 201
    bmpHeight = bmp.getHeight();
188 202
    bmpWidth  = bmp.getWidth();

Also available in: Unified diff