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/listener/ListenerRenderer.java
31 31
import org.distorted.library.Distorted;
32 32
import org.distorted.library.DistortedBitmap;
33 33
import org.distorted.library.EffectTypes;
34
import org.distorted.library.type.Dynamic3D;
34 35
import org.distorted.library.type.Static2D;
35 36
import org.distorted.library.type.Static3D;
36 37
import org.distorted.library.type.Static4D;
......
70 71
      int pointx   = mRnd.nextInt( (int)(0.8f*bmpWidth ))+ (int)(0.1f*bmpWidth ); // at a random place on the bitmap (but not near the edge)
71 72
      int pointy   = mRnd.nextInt( (int)(0.8f*bmpHeight))+ (int)(0.1f*bmpHeight); // 
72 73
      int duration = 1000 + mRnd.nextInt(3000);                                   // for anytime from 3 to 4 seconds 
73
        
74
      Static3D dp3d = new Static3D(0,0,height);
75
      Static2D dp2d = new Static2D(pointx,pointy);
76
      Static4D dr  = new Static4D(0,0,radius,radius);
77
     
78
      return water.distort(dp3d, dr, dp2d, duration, 1.0f);
74

  
75
      Dynamic3D dDistort = new Dynamic3D();
76
      dDistort.setCount(1);
77
      dDistort.setDuration(duration);
78
      dDistort.add(new Static3D(0,0,     0));
79
      dDistort.add(new Static3D(0,0,height));
80

  
81
      return water.distort(dDistort, new Static2D(pointx,pointy), new Static4D(0,0,radius,radius));
79 82
      }
80 83
   
81 84
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff