Revision f4f3a440
Added by Leszek Koltunski almost 9 years ago
| src/main/java/org/distorted/examples/deform/DeformRenderer.java | ||
|---|---|---|
| 77 | 77 | 
    private long lastTime=0;  | 
| 78 | 78 | 
    private long[] durations;  | 
| 79 | 79 | 
    private int currDuration;  | 
| 80 | 
    private float mRadius;  | 
|
| 80 | 81 | 
     | 
| 81 | 82 | 
    private EffectNames mMode = EffectNames.DISTORT;  | 
| 82 | 83 | 
    private boolean bitmapCreated = false;  | 
| ... | ... | |
| 95 | 96 | 
    fpsEffects = new DistortedEffects();  | 
| 96 | 97 | 
    stretchEffects = new DistortedEffects();  | 
| 97 | 98 | 
     | 
| 98 | 
          mRegion = new Static4D(0,0,50,50);
   | 
|
| 99 | 
          mRegion = new Static4D(0,0,0,0);
   | 
|
| 99 | 100 | 
     | 
| 100 | 101 | 
    durations = new long[NUM_FRAMES+1];  | 
| 101 | 102 | 
    currDuration = 0;  | 
| ... | ... | |
| 164 | 165 | 
     | 
| 165 | 166 | 
    void setRegionRadius(int r)  | 
| 166 | 167 | 
          {
   | 
| 167 | 
    mRegion.set3( r==100 ? 100*scrWidth : r*scrWidth/100.0f);  | 
|
| 168 | 
    mRadius = ( r==100 ? 100.0f : r/100.0f);  | 
|
| 169 | 
    mRegion.set3(mRadius*scrWidth);  | 
|
| 168 | 170 | 
    }  | 
| 169 | 171 | 
     | 
| 170 | 172 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
| ... | ... | |
| 202 | 204 | 
    scrHeight = height;  | 
| 203 | 205 | 
    scrWidth = width;  | 
| 204 | 206 | 
     | 
| 207 | 
    mRegion.set3(mRadius*scrWidth);  | 
|
| 208 | 
     | 
|
| 205 | 209 | 
    if( !bitmapCreated )  | 
| 206 | 210 | 
           {
   | 
| 207 | 211 | 
    createBitmap(scrWidth/2,scrHeight/2);  | 
Also available in: Unified diff
Correct 'Deform'