Project

General

Profile

« Previous | Next » 

Revision 7589635e

Added by Leszek Koltunski almost 8 years ago

Major push towards simplifying DistortedObject's public API.
All MATRIX effects are using the new API - the 'DataND' marker interfaces.

View differences:

src/main/java/org/distorted/examples/fov/FOVRenderer.java
24 24

  
25 25
import org.distorted.library.Distorted;
26 26
import org.distorted.library.DistortedBitmap;
27
import org.distorted.library.type.Float2D;
28
import org.distorted.library.type.Float3D;
29
import org.distorted.library.type.Float4D;
27
import org.distorted.library.type.Static2D;
28
import org.distorted.library.type.Static3D;
29
import org.distorted.library.type.Static4D;
30 30

  
31 31
import android.graphics.Bitmap;
32 32
import android.graphics.Canvas;
......
115 115
        
116 116
      int min = w<h ? w:h;
117 117
        
118
      Float3D dp3D = new Float3D(0,0,min/5);
119
      Float4D dr = new Float4D(0,0,min/5,min/5);
118
      Static3D dp3D = new Static3D(0,0,min/5);
119
      Static4D dr = new Static4D(0,0,min/5,min/5);
120 120
        
121
      Float2D point1 = new Float2D(  w/4,   h/4);
122
      Float2D point2 = new Float2D(3*w/4,   h/4);
123
      Float2D point3 = new Float2D(  w/4, 3*h/4);
124
      Float2D point4 = new Float2D(3*w/4, 3*h/4);
121
      Static2D point1 = new Static2D(  w/4,   h/4);
122
      Static2D point2 = new Static2D(3*w/4,   h/4);
123
      Static2D point3 = new Static2D(  w/4, 3*h/4);
124
      Static2D point4 = new Static2D(3*w/4, 3*h/4);
125 125
       
126 126
      fov.distort(dp3D, dr, point1, 0, 0.5f);
127 127
      fov.distort(dp3D, dr, point2, 0, 0.5f);

Also available in: Unified diff