Project

General

Profile

« Previous | Next » 

Revision bcbd5b45

Added by Leszek Koltunski about 4 years ago

Adjustment to Static's API.

View differences:

src/main/java/org/distorted/examples/deform/DeformRenderer.java
159 159
   void setRegionRadius(int r)
160 160
      {
161 161
      mRadius = ( r==100 ? 100.0f : r/200.0f);
162
      mRegion.set4(mRadius*scrWidth);
162
      mRegion.set3(mRadius*scrWidth);
163 163
      }
164 164

  
165 165
///////////////////////////////////////////////////////////////////////////////////////////////////
......
185 185
     scrHeight = height;
186 186
     scrWidth  = width;
187 187

  
188
     mRegion.set4(mRadius*scrWidth);
188
     mRegion.set3(mRadius*scrWidth);
189 189

  
190 190
     Canvas stretchCanvas;
191 191
     int w=width/2;
......
295 295
       {
296 296
       case DISTORT: for(int i=1; i<NUM_VECTORS-1; i++)
297 297
                       {
298
                       vDistort[i].set( vDistort[i-1].get1()*damp, vDistort[i-1].get2()*damp, 0 );
298
                       vDistort[i].set( vDistort[i-1].get0()*damp, vDistort[i-1].get1()*damp, 0 );
299 299
                       }
300 300
                     vDistort[NUM_VECTORS-1].set(0,0,0);
301 301
                     mEffects.apply(mReleasedDistort);
......
303 303
                     break;
304 304
       case DEFORM : for(int i=1; i<NUM_VECTORS-1; i++)
305 305
                       {
306
                       vDeform[i].set( vDeform[i-1].get1()*damp, vDeform[i-1].get2()*damp, 0 );
306
                       vDeform[i].set( vDeform[i-1].get0()*damp, vDeform[i-1].get1()*damp, 0 );
307 307
                       }
308 308
                     vDeform[NUM_VECTORS-1].set(0,0,0);
309 309
                     mEffects.apply(mReleasedDeform);
......
311 311
                     break;
312 312
       case SHEAR  : for(int i=1; i<NUM_VECTORS-1; i++)
313 313
                       {
314
                       vShear[i].set( vShear[i-1].get1()*damp, vShear[i-1].get2()*damp, 0 );
314
                       vShear[i].set( vShear[i-1].get0()*damp, vShear[i-1].get1()*damp, 0 );
315 315
                       }
316 316
                     vShear[NUM_VECTORS-1].set(0,0,0);
317 317
                     mEffects.apply(mReleasedShear);

Also available in: Unified diff