Project

General

Profile

« Previous | Next » 

Revision f3ca895f

Added by Leszek Koltunski over 4 years ago

Rename MeshFlat MeshRectangles.

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldRenderer.java
36 36
import org.distorted.library.main.DistortedLibrary;
37 37
import org.distorted.library.main.DistortedEffects;
38 38
import org.distorted.library.main.DistortedScreen;
39
import org.distorted.library.mesh.MeshFlat;
39
import org.distorted.library.mesh.MeshRectangles;
40 40
import org.distorted.library.main.DistortedTexture;
41 41
import org.distorted.library.type.Static3D;
42 42

  
......
54 54
   private DistortedEffects mEffects;
55 55
   private DistortedTexture mTexture;
56 56
   private DistortedScreen mScreen;
57
   private MeshFlat mMesh;
57
   private MeshRectangles mMesh;
58 58
   private AroundTheWorldEffectsManager mManager;
59 59
   private int mObjWidth, mObjHeight;
60 60
   private Static3D mMove, mScale;
......
139 139
      if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
140 140
      mTexture.setTexture(bitmap);
141 141

  
142
      if( mMesh==null ) mMesh = new MeshFlat(30,30*mObjHeight/mObjWidth);
142
      if( mMesh==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);
143 143

  
144 144
      mScreen.detachAll();
145 145
      mScreen.attach(mTexture, mEffects, mMesh);
src/main/java/org/distorted/examples/bean/BeanRenderer.java
34 34
import org.distorted.library.main.DistortedScreen;
35 35
import org.distorted.library.main.DistortedLibrary;
36 36
import org.distorted.library.main.DistortedTexture;
37
import org.distorted.library.mesh.MeshFlat;
37
import org.distorted.library.mesh.MeshRectangles;
38 38
import org.distorted.library.type.Dynamic3D;
39 39
import org.distorted.library.type.Static3D;
40 40
import org.distorted.library.type.Static4D;
......
51 51
   private DistortedEffects mEffects;
52 52
   private DistortedScreen mScreen;
53 53
   private DistortedTexture mTexture;
54
   private MeshFlat mMesh;
54
   private MeshRectangles mMesh;
55 55
   private int mObjHeight, mObjWidth;
56 56
   private Static3D mMove, mScale;
57 57

  
......
151 151
      
152 152
     if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
153 153
     mTexture.setTexture(bitmap);
154
     if( mMesh==null ) mMesh = new MeshFlat(25,25*mObjHeight/mObjWidth);
154
     if( mMesh==null ) mMesh = new MeshRectangles(25,25*mObjHeight/mObjWidth);
155 155

  
156 156
     mScreen.detachAll();
157 157
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/blur/BlurRenderer.java
33 33
import org.distorted.library.main.DistortedNode;
34 34
import org.distorted.library.main.DistortedScreen;
35 35
import org.distorted.library.main.DistortedTexture;
36
import org.distorted.library.mesh.MeshFlat;
36
import org.distorted.library.mesh.MeshRectangles;
37 37
import org.distorted.library.type.Dynamic1D;
38 38
import org.distorted.library.type.Static1D;
39 39
import org.distorted.library.type.Static3D;
......
55 55
    private DistortedEffects mEffects, mBufferEffects;
56 56
    private DistortedScreen mScreen;
57 57
    private DistortedFramebuffer mBuffer;
58
    private MeshFlat mMesh;
58
    private MeshRectangles mMesh;
59 59
    private Static1D mRadiusSta;
60 60
    private int mObjHeight, mObjWidth;
61 61
    private Static3D mMove, mScale, mBufferMove, mBufferScale;
......
65 65
   BlurRenderer(GLSurfaceView v)
66 66
      {
67 67
      mView   = v;
68
      mMesh   = new MeshFlat(1,1);
68
      mMesh   = new MeshRectangles(1,1);
69 69
      mScreen = new DistortedScreen();
70 70
      mBuffer = new DistortedFramebuffer(SIZE,SIZE,1, DistortedFramebuffer.NO_DEPTH_NO_STENCIL);
71 71

  
src/main/java/org/distorted/examples/catanddog/CatAndDogRenderer.java
35 35
import org.distorted.library.main.DistortedEffects;
36 36
import org.distorted.library.main.DistortedScreen;
37 37
import org.distorted.library.main.DistortedTexture;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.type.Dynamic1D;
40 40
import org.distorted.library.type.Dynamic3D;
41 41
import org.distorted.library.type.Static1D;
......
53 53

  
54 54
    private GLSurfaceView mView;
55 55
    private DistortedEffects mEffects;
56
    private MeshFlat mMesh;
56
    private MeshRectangles mMesh;
57 57
    private DistortedTexture mTexture;
58 58
    private DistortedScreen mScreen;
59 59
    private int mObjHeight, mObjWidth;
......
65 65
      {   
66 66
      mView = v;
67 67

  
68
      mMesh = new MeshFlat(1,1);  // no vertex effects, grid can be a (1x1) quad.
68
      mMesh = new MeshRectangles(1,1);  // no vertex effects, grid can be a (1x1) quad.
69 69

  
70 70
      Dynamic3D moveDyn= new Dynamic3D(DURATION,0.0f);
71 71
      mRotate = new Static3D(0,0,0);
src/main/java/org/distorted/examples/check/CheckRenderer.java
37 37
import org.distorted.library.main.DistortedEffects;
38 38
import org.distorted.library.main.DistortedScreen;
39 39
import org.distorted.library.main.DistortedTexture;
40
import org.distorted.library.mesh.MeshFlat;
40
import org.distorted.library.mesh.MeshRectangles;
41 41
import org.distorted.library.type.Dynamic3D;
42 42
import org.distorted.library.type.Static1D;
43 43
import org.distorted.library.type.Static3D;
......
63 63
    private GLSurfaceView mView;
64 64
    private DistortedEffects mEffects;
65 65
    private DistortedTexture mTexture;
66
    private MeshFlat mMesh;
66
    private MeshRectangles mMesh;
67 67
    private DistortedScreen mScreen;
68 68
    private int mObjHeight, mObjWidth;
69 69
    private Static3D mMove, mScale, mCenter;
......
184 184
      if( mTexture==null ) mTexture = new DistortedTexture(mObjWidth,mObjHeight);
185 185
      mTexture.setTexture(bitmap);
186 186

  
187
      if( mMesh==null ) mMesh = new MeshFlat(30,30*mObjHeight/mObjWidth);
187
      if( mMesh==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);
188 188

  
189 189
      mScreen.detachAll();
190 190
      mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/deform/DeformRenderer.java
32 32
import org.distorted.library.main.DistortedScreen;
33 33
import org.distorted.library.main.DistortedTexture;
34 34
import org.distorted.library.mesh.MeshBase;
35
import org.distorted.library.mesh.MeshFlat;
35
import org.distorted.library.mesh.MeshRectangles;
36 36

  
37 37
import org.distorted.library.message.EffectListener;
38 38
import org.distorted.library.type.Dynamic3D;
......
193 193

  
194 194
     if( mMesh!=null ) mMesh.markForDeletion();
195 195

  
196
     mMesh = new MeshFlat(50,50*h/w);
196
     mMesh = new MeshRectangles(50,50*h/w);
197 197
     Bitmap stretchBitmap = Bitmap.createBitmap(w,h, Bitmap.Config.ARGB_8888);
198 198
     stretchCanvas = new Canvas(stretchBitmap);
199 199

  
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
35 35
import org.distorted.library.main.DistortedScreen;
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.main.DistortedEffects;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.type.Dynamic3D;
40 40
import org.distorted.library.type.Static1D;
41 41
import org.distorted.library.type.Static3D;
......
54 54
   private GLSurfaceView mView;
55 55
   private DistortedEffects[] mEffects;
56 56
   private DistortedTexture[] mTexture;
57
   private MeshFlat mMesh;
57
   private MeshRectangles mMesh;
58 58
   private DistortedScreen mScreen;
59 59
   private int bmpHeight, bmpWidth;
60 60
   private Static3D mScale;
......
186 186
     mTexture[1].setTexture(bitmap1);
187 187
     mTexture[2].setTexture(bitmap2);
188 188

  
189
     if( mMesh==null ) mMesh = new MeshFlat(30,30*bmpHeight/bmpWidth);
189
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
190 190

  
191 191
     mScreen.detachAll();
192 192
     for(int i=NUM-1; i>=0; i--) mScreen.attach(mTexture[i], mEffects[i], mMesh);
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java
35 35
import org.distorted.library.main.DistortedLibrary;
36 36
import org.distorted.library.main.DistortedEffects;
37 37
import org.distorted.library.main.DistortedScreen;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.main.DistortedTexture;
40 40
import org.distorted.library.type.Dynamic1D;
41 41
import org.distorted.library.type.Dynamic3D;
......
56 56
   private GLSurfaceView mView;
57 57
   private DistortedEffects[] mEffects;
58 58
   private DistortedTexture mTexture;
59
   private MeshFlat mMesh;
59
   private MeshRectangles mMesh;
60 60
   private DistortedScreen mScreen;
61 61
   private int bmpHeight, bmpWidth;
62 62
   private Static3D mScale;
......
173 173
     bmpHeight = bitmap.getHeight();
174 174
     bmpWidth  = bitmap.getWidth();
175 175

  
176
     if( mMesh==null ) mMesh = new MeshFlat(30,30*bmpHeight/bmpWidth);
176
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
177 177
     if( mTexture==null ) mTexture  = new DistortedTexture(bmpWidth,bmpHeight);
178 178
     mTexture.setTexture(bitmap);
179 179

  
src/main/java/org/distorted/examples/dynamic/DynamicRenderer.java
30 30

  
31 31
import org.distorted.library.main.DistortedEffects;
32 32
import org.distorted.library.main.DistortedScreen;
33
import org.distorted.library.mesh.MeshFlat;
33
import org.distorted.library.mesh.MeshRectangles;
34 34
import org.distorted.library.main.DistortedTexture;
35 35
import org.distorted.library.main.DistortedLibrary;
36 36

  
......
42 42
   private DistortedTexture mTexture;
43 43
   private DistortedEffects mEffects;
44 44
   private DistortedScreen mScreen;
45
   private MeshFlat mMesh;
45
   private MeshRectangles mMesh;
46 46
   private Canvas mCanvas;
47 47
   private Bitmap mBitmap;
48 48
   private Paint mPaint;
......
60 60
     mPaint.setStyle(Style.FILL);
61 61
      
62 62
     mView    = v;
63
     mMesh    = new MeshFlat(1,1);
63
     mMesh    = new MeshRectangles(1,1);
64 64
     mEffects = new DistortedEffects();
65 65
     mScreen  = new DistortedScreen();
66 66
     }
src/main/java/org/distorted/examples/effectqueue/EffectQueueRenderer.java
37 37
import org.distorted.library.main.DistortedEffects;
38 38
import org.distorted.library.main.DistortedLibrary;
39 39
import org.distorted.library.main.DistortedScreen;
40
import org.distorted.library.mesh.MeshFlat;
40
import org.distorted.library.mesh.MeshRectangles;
41 41
import org.distorted.library.main.DistortedTexture;
42 42
import org.distorted.library.message.EffectListener;
43 43
import org.distorted.library.type.Static3D;
......
57 57
  private Static3D mScale;
58 58

  
59 59
  private DistortedTexture mTexture;
60
  private MeshFlat mMesh;
60
  private MeshRectangles mMesh;
61 61
  private DistortedEffects mEffects;
62 62
  private DistortedScreen mScreen;
63 63

  
......
77 77
    mScale = new Static3D(1,1,1);
78 78
    MatrixEffectScale scaleEffect = new MatrixEffectScale(mScale);
79 79

  
80
    mMesh = new MeshFlat(MESH_QUALITY,MESH_QUALITY*texHeight/texWidth);
80
    mMesh = new MeshRectangles(MESH_QUALITY,MESH_QUALITY*texHeight/texWidth);
81 81
    mTexture = new DistortedTexture(texWidth,texHeight);
82 82
    mEffects = new DistortedEffects();
83 83
    mEffects.apply(scaleEffect);
src/main/java/org/distorted/examples/generic/GenericActivity2.java
35 35
import org.distorted.library.main.DistortedEffects;
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.mesh.MeshCubes;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.mesh.MeshBase;
40 40
import org.distorted.library.mesh.MeshQuad;
41 41
import org.distorted.library.mesh.MeshSphere;
......
99 99
                mMesh = new MeshCubes(numCols, str, numSlic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
100 100
                }
101 101
              break;
102
      case 1: mMesh = new MeshFlat(numCols,numRows);
102
      case 1: mMesh = new MeshRectangles(numCols,numRows);
103 103
              break;
104 104
      case 2: mMesh = new MeshSphere(numRows);
105 105
              break;
src/main/java/org/distorted/examples/generic/GenericRenderer.java
35 35
import org.distorted.library.main.DistortedScreen;
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.mesh.MeshBase;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.mesh.MeshSphere;
40 40
import org.distorted.library.type.Static3D;
41 41
import org.distorted.library.type.Static4D;
......
99 99
      DistortedEffects regionEffects     = new DistortedEffects();
100 100

  
101 101
      MeshBase mesh    = act.getMesh();
102
      MeshFlat quad    = new MeshFlat(1,1);
102
      MeshRectangles quad    = new MeshRectangles(1,1);
103 103

  
104 104
      mFactor = mesh instanceof MeshSphere ? 1.0f : 0.7f;
105 105

  
src/main/java/org/distorted/examples/girl/GirlRenderer.java
34 34
import org.distorted.library.effect.VertexEffectSwirl;
35 35
import org.distorted.library.main.DistortedLibrary;
36 36
import org.distorted.library.main.DistortedScreen;
37
import org.distorted.library.mesh.MeshFlat;
37
import org.distorted.library.mesh.MeshRectangles;
38 38
import org.distorted.library.main.DistortedTexture;
39 39
import org.distorted.library.main.DistortedEffects;
40 40
import org.distorted.library.type.Dynamic1D;
......
55 55
    private DistortedEffects mEffects;
56 56
    private DistortedScreen mScreen;
57 57
    private DistortedTexture mTexture;
58
    private MeshFlat mMesh;
58
    private MeshRectangles mMesh;
59 59
    private Static3D v0,v1,v2,v3;
60 60
    private Static1D dBegin, dMiddle, dEnd, s0;
61 61
    private int bmpHeight, bmpWidth;
......
213 213
     if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
214 214
     mTexture.setTexture(bitmap);
215 215

  
216
     if( mMesh==null ) mMesh = new MeshFlat(30,30*bmpHeight/bmpWidth);
216
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
217 217

  
218 218
     mScreen.detachAll();
219 219
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/glow/GlowRenderer.java
32 32
import org.distorted.library.main.DistortedEffects;
33 33
import org.distorted.library.main.DistortedScreen;
34 34
import org.distorted.library.main.DistortedTexture;
35
import org.distorted.library.mesh.MeshFlat;
35
import org.distorted.library.mesh.MeshRectangles;
36 36
import org.distorted.library.type.Static1D;
37 37
import org.distorted.library.type.Static3D;
38 38
import org.distorted.library.type.Static4D;
......
80 80
      effects.apply(mGlow);
81 81

  
82 82
      mScreen = new DistortedScreen();
83
      mScreen.attach(mLeaf, effects, new MeshFlat(1,1) );
83
      mScreen.attach(mLeaf, effects, new MeshRectangles(1,1) );
84 84
      mScreen.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
85 85
      mScreen.showFPS();
86 86
      }
src/main/java/org/distorted/examples/inflate/InflateActivity2.java
24 24
import org.distorted.library.main.DistortedTexture;
25 25
import org.distorted.library.mesh.MeshBase;
26 26
import org.distorted.library.mesh.MeshCubes;
27
import org.distorted.library.mesh.MeshFlat;
27
import org.distorted.library.mesh.MeshRectangles;
28 28
import org.distorted.library.mesh.MeshQuad;
29 29
import org.distorted.library.mesh.MeshSphere;
30 30
import org.distorted.library.type.Static4D;
......
122 122
                  mMesh = new MeshCubes(numCols, str, numSlic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
123 123
                  }
124 124
                break;
125
        case 1: mMesh = new MeshFlat(numCols,numRows);
125
        case 1: mMesh = new MeshRectangles(numCols,numRows);
126 126
                break;
127 127
        case 2: mMesh = new MeshSphere(numRows);
128 128
                break;
src/main/java/org/distorted/examples/listener/ListenerRenderer.java
34 34
import org.distorted.library.effect.VertexEffectDistort;
35 35
import org.distorted.library.main.DistortedLibrary;
36 36
import org.distorted.library.main.DistortedScreen;
37
import org.distorted.library.mesh.MeshFlat;
37
import org.distorted.library.mesh.MeshRectangles;
38 38
import org.distorted.library.main.DistortedTexture;
39 39
import org.distorted.library.main.DistortedEffects;
40 40
import org.distorted.library.type.Dynamic3D;
......
56 56
   private DistortedEffects mEffects;
57 57
   private DistortedScreen mScreen;
58 58
   private DistortedTexture mTexture;
59
   private MeshFlat mMesh;
59
   private MeshRectangles mMesh;
60 60
   private int bmpHeight, bmpWidth;
61 61
   private Random mRnd;
62 62
   private Static3D mMove, mScale;
......
165 165
     if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
166 166
     mTexture.setTexture(bitmap);
167 167

  
168
     if( mMesh==null ) mMesh = new MeshFlat(50,50*bmpHeight/bmpWidth);
168
     if( mMesh==null ) mMesh = new MeshRectangles(50,50*bmpHeight/bmpWidth);
169 169

  
170 170
     mScreen.detachAll();
171 171
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/mirror/MirrorRenderer.java
32 32
import org.distorted.library.main.DistortedFramebuffer;
33 33
import org.distorted.library.main.DistortedScreen;
34 34
import org.distorted.library.main.DistortedTexture;
35
import org.distorted.library.mesh.MeshFlat;
35
import org.distorted.library.mesh.MeshRectangles;
36 36
import org.distorted.library.type.Static1D;
37 37
import org.distorted.library.type.Static3D;
38 38

  
......
60 60
   private DistortedTexture mTextureMirror, mTextureHead;
61 61
   private DistortedFramebuffer mOffScreen1, mOffScreen2;
62 62
   private DistortedScreen mScreen;
63
   private MeshFlat mQuad;
63
   private MeshRectangles mQuad;
64 64
   private Static3D mHeadPosition, mScaleMirror, mMoveOffscreen2, mScaleHead;
65 65

  
66 66
   private int mX;
......
72 72
   MirrorRenderer(GLSurfaceView view)
73 73
      { 
74 74
      mView    = view;
75
      mQuad    = new MeshFlat(1,1);
75
      mQuad    = new MeshRectangles(1,1);
76 76
      mScreen  = new DistortedScreen();
77 77

  
78 78
      mEffectsMirror    = new DistortedEffects();
src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.java
33 33
import org.distorted.library.main.DistortedEffects;
34 34
import org.distorted.library.main.DistortedScreen;
35 35
import org.distorted.library.main.DistortedTexture;
36
import org.distorted.library.mesh.MeshFlat;
36
import org.distorted.library.mesh.MeshRectangles;
37 37
import org.distorted.library.type.Dynamic3D;
38 38
import org.distorted.library.type.Static3D;
39 39
import org.distorted.library.type.Static4D;
......
49 49
    private GLSurfaceView mView;
50 50
    private DistortedEffects mEffects;
51 51
    private DistortedTexture mTexture;
52
    private MeshFlat mMesh;
52
    private MeshRectangles mMesh;
53 53
    private DistortedScreen mScreen;
54 54
    private int bmpHeight, bmpWidth;
55 55
    private Static3D mMove, mScale;
......
156 156
      if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
157 157

  
158 158
      // likewise the Mesh
159
      if( mMesh==null ) mMesh = new MeshFlat(9,9*bmpHeight/bmpWidth);
159
      if( mMesh==null ) mMesh = new MeshRectangles(9,9*bmpHeight/bmpWidth);
160 160

  
161 161
      // even if mTexture wasn't null, we still need to call setTexture() on it
162 162
      // because every time activity goes to background, its OpenGL resources
src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
37 37
import org.distorted.library.main.DistortedScreen;
38 38
import org.distorted.library.main.DistortedTexture;
39 39
import org.distorted.library.main.DistortedEffects;
40
import org.distorted.library.mesh.MeshFlat;
40
import org.distorted.library.mesh.MeshRectangles;
41 41

  
42 42
///////////////////////////////////////////////////////////////////////////////////////////////////
43 43

  
......
52 52
   private DistortedEffects mEffects;
53 53
   private DistortedTexture mTexture;
54 54
   private DistortedScreen mScreen;
55
   private MeshFlat mMesh;
55
   private MeshRectangles mMesh;
56 56
   private boolean mRefresh;
57 57

  
58 58
///////////////////////////////////////////////////////////////////////////////////////////////////
......
142 142
     mCanvas  = new Canvas(mBitmap);
143 143

  
144 144
     if( mMesh!=null ) mMesh.markForDeletion();
145
     mMesh = new MeshFlat(80,80*texH/texW);
145
     mMesh = new MeshRectangles(80,80*texH/texW);
146 146

  
147 147
     mScreen.detachAll();
148 148
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/movingglow/MovingGlowRenderer.java
35 35
import org.distorted.library.main.DistortedScreen;
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.mesh.MeshBase;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.message.EffectListener;
40 40
import org.distorted.library.type.Dynamic1D;
41 41
import org.distorted.library.type.Dynamic4D;
......
78 78

  
79 79
      mLeaf = new DistortedTexture(LEAF_SIZE,LEAF_SIZE);
80 80
      DistortedTexture surface = new DistortedTexture(mRootW,mRootH);
81
      MeshBase mesh = new MeshFlat(1,1);
81
      MeshBase mesh = new MeshRectangles(1,1);
82 82

  
83 83
      DistortedNode root = new DistortedNode(surface, new DistortedEffects(), mesh);
84 84
     
src/main/java/org/distorted/examples/objecttree/ObjectTreeRenderer.java
38 38
import org.distorted.library.main.DistortedScreen;
39 39
import org.distorted.library.main.DistortedLibrary;
40 40
import org.distorted.library.mesh.MeshCubes;
41
import org.distorted.library.mesh.MeshFlat;
41
import org.distorted.library.mesh.MeshRectangles;
42 42
import org.distorted.library.main.DistortedTexture;
43 43
import org.distorted.library.type.Dynamic;
44 44
import org.distorted.library.type.Dynamic1D;
......
60 60
   private DistortedTexture mLisaTexture, mGridTexture;
61 61
   private DistortedScreen mScreen;
62 62
   private DistortedNode mRoot;
63
   private MeshFlat mMeshFlat;
63
   private MeshRectangles mMeshRectangles;
64 64
   private MeshCubes mMeshCubes;
65 65
   private int lisaHeight, lisaWidth;
66 66
   private boolean mDepth;
......
186 186
      final Static4D mapLR = new Static4D(0.0f,0.0f,1.0f/GRID,1.0f     );
187 187
      final Static4D mapTB = new Static4D(0.0f,0.0f,1.0f     ,1.0f/GRID);
188 188

  
189
      if( mMeshFlat==null ) mMeshFlat = new MeshFlat(1,1);
189
      if( mMeshRectangles ==null ) mMeshRectangles = new MeshRectangles(1,1);
190 190
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(GRID,GRID,1, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
191 191

  
192 192
      int gridDepth = mGridTexture.getDepth(mMeshCubes);
193 193

  
194
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshFlat);
194
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshRectangles);
195 195
      mRoot.attach(mGridTexture,gridEffects,mMeshCubes);
196 196

  
197 197
      setDepthPriv();
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
35 35
import org.distorted.library.main.DistortedLibrary;
36 36
import org.distorted.library.main.DistortedScreen;
37 37
import org.distorted.library.main.DistortedNode;
38
import org.distorted.library.mesh.MeshFlat;
38
import org.distorted.library.mesh.MeshRectangles;
39 39
import org.distorted.library.type.Dynamic1D;
40 40
import org.distorted.library.type.Static3D;
41 41
import org.distorted.library.type.Static1D;
......
57 57
   private DistortedNode mRoot;
58 58
   private DistortedTexture mLeaf;
59 59
   private DistortedScreen mScreen;
60
   private MeshFlat mMesh;
60
   private MeshRectangles mMesh;
61 61
   private int mScreenW, mScreenH;
62 62
   private int mPrevRendered, mCurrRendered;
63 63
   private Static3D mMove, mScale;
......
95 95

  
96 96
      mLeaf = new DistortedTexture(LEAF_SIZE,LEAF_SIZE);
97 97
      DistortedTexture surface = new DistortedTexture(3*LEAF_SIZE,3*LEAF_SIZE);
98
      mMesh = new MeshFlat(1,1);
98
      mMesh = new MeshRectangles(1,1);
99 99
      mMove = new Static3D(0,0,0);
100 100
      mScale= new Static3D(1,1,1);
101 101

  
src/main/java/org/distorted/examples/plainmonalisa/RenderThread.java
36 36
import org.distorted.library.main.DistortedLibrary;
37 37
import org.distorted.library.main.DistortedEffects;
38 38
import org.distorted.library.main.DistortedScreen;
39
import org.distorted.library.mesh.MeshFlat;
39
import org.distorted.library.mesh.MeshRectangles;
40 40
import org.distorted.library.main.DistortedTexture;
41 41
import org.distorted.library.type.Dynamic3D;
42 42
import org.distorted.library.type.Static3D;
......
66 66

  
67 67
  private DistortedEffects mEffects;
68 68
  private DistortedTexture mTexture;
69
  private MeshFlat mMesh;
69
  private MeshRectangles mMesh;
70 70
  private DistortedScreen mScreen;
71 71
  private int bmpHeight, bmpWidth;
72 72
  private SurfaceView mView;
......
265 265
    if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
266 266
    mTexture.setTexture(bmp);
267 267

  
268
    if( mMesh==null ) mMesh = new MeshFlat(9,9*bmpHeight/bmpWidth);
268
    if( mMesh==null ) mMesh = new MeshRectangles(9,9*bmpHeight/bmpWidth);
269 269

  
270 270
    mScreen.detachAll();
271 271
    mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/postprocesstree/PostprocessTreeRenderer.java
34 34
import org.distorted.library.main.DistortedNode;
35 35
import org.distorted.library.main.DistortedScreen;
36 36
import org.distorted.library.main.DistortedTexture;
37
import org.distorted.library.mesh.MeshFlat;
37
import org.distorted.library.mesh.MeshRectangles;
38 38
import org.distorted.library.type.Dynamic1D;
39 39
import org.distorted.library.type.Static1D;
40 40
import org.distorted.library.type.Static3D;
......
78 78

  
79 79
      mLeaf = new DistortedTexture(LEAF_SIZE,LEAF_SIZE);
80 80

  
81
      MeshFlat mesh = new MeshFlat(1,1);
81
      MeshRectangles mesh = new MeshRectangles(1,1);
82 82
      mMove = new Static3D(0,0,0);
83 83
      mScale= new Static3D(1,1,1);
84 84

  
src/main/java/org/distorted/examples/projection/ProjectionRenderer.java
26 26
import org.distorted.library.main.DistortedLibrary;
27 27
import org.distorted.library.main.DistortedEffects;
28 28
import org.distorted.library.main.DistortedScreen;
29
import org.distorted.library.mesh.MeshFlat;
29
import org.distorted.library.mesh.MeshRectangles;
30 30
import org.distorted.library.main.DistortedTexture;
31 31
import org.distorted.library.type.Static3D;
32 32
import org.distorted.library.type.Static4D;
......
44 44
   private GLSurfaceView mView;
45 45
   private DistortedEffects mEffects;
46 46
   private DistortedScreen mScreen;
47
   private MeshFlat mMesh;
47
   private MeshRectangles mMesh;
48 48
   private DistortedTexture mTexture;
49 49
   private float mF, mNear;
50 50

  
......
140 140
      // likewise with the Mesh
141 141
      if( mMesh!=null ) mMesh.markForDeletion();
142 142

  
143
      mMesh = new MeshFlat(100,100*height/width);
143
      mMesh = new MeshRectangles(100,100*height/width);
144 144

  
145 145
      mScreen.detachAll();
146 146
      mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/save/SaveRenderer.java
37 37
import org.distorted.library.main.DistortedEffects;
38 38
import org.distorted.library.main.DistortedScreen;
39 39
import org.distorted.library.main.DistortedTexture;
40
import org.distorted.library.mesh.MeshFlat;
40
import org.distorted.library.mesh.MeshRectangles;
41 41
import org.distorted.library.main.DistortedFramebuffer;
42 42
import org.distorted.library.type.Dynamic1D;
43 43
import org.distorted.library.type.Static1D;
......
58 58
  private DistortedEffects mEffects;
59 59
  private DistortedFramebuffer mOffscreen;
60 60
  private DistortedTexture mTexture;
61
  private MeshFlat mMesh;
61
  private MeshRectangles mMesh;
62 62
  private DistortedScreen mScreen;
63 63
  private Static1D s0;
64 64
  private Static3D mScaleFactor, mScaleMain, mMove;
......
245 245
    bmpHeight = bitmap.getHeight();
246 246
    bmpWidth  = bitmap.getWidth();
247 247

  
248
    if( mMesh==null ) mMesh = new MeshFlat(30,30*bmpHeight/bmpWidth);
248
    if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
249 249
    if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
250 250
    mTexture.setTexture(bitmap);
251 251

  
src/main/java/org/distorted/examples/sink/SinkRenderer.java
33 33
import org.distorted.library.main.DistortedLibrary;
34 34
import org.distorted.library.main.DistortedEffects;
35 35
import org.distorted.library.main.DistortedScreen;
36
import org.distorted.library.mesh.MeshFlat;
36
import org.distorted.library.mesh.MeshRectangles;
37 37
import org.distorted.library.main.DistortedTexture;
38 38
import org.distorted.library.type.Dynamic1D;
39 39
import org.distorted.library.type.Static1D;
......
51 51
  private DistortedEffects mEffects;
52 52
  private DistortedScreen mScreen;
53 53
  private DistortedTexture mTexture;
54
  private MeshFlat mMesh;
54
  private MeshRectangles mMesh;
55 55
  private int bmpHeight, bmpWidth;
56 56
  private Static3D mScale, mMove;
57 57

  
......
131 131

  
132 132
    if( mTexture==null ) mTexture = new DistortedTexture(bmpWidth,bmpHeight);
133 133
    mTexture.setTexture(bitmap);
134
    if( mMesh==null ) mMesh = new MeshFlat(30,30*bmpHeight/bmpWidth);
134
    if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
135 135

  
136 136
    mScreen.detachAll();
137 137
    mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
34 34
import org.distorted.library.effect.MatrixEffectScale;
35 35
import org.distorted.library.main.DistortedNode;
36 36
import org.distorted.library.main.DistortedScreen;
37
import org.distorted.library.mesh.MeshFlat;
37
import org.distorted.library.mesh.MeshRectangles;
38 38
import org.distorted.library.type.Dynamic1D;
39 39
import org.distorted.library.type.Dynamic3D;
40 40
import org.distorted.library.type.Static1D;
......
110 110
  private DistortedEffects[] mStarEffects;
111 111
  private DistortedNode mBackground;
112 112
  private DistortedScreen mScreen;
113
  private MeshFlat mQuad;
113
  private MeshRectangles mQuad;
114 114

  
115 115
  private long alphaEffectID, scaleEffectID, moveEffectID;
116 116
  private Random mRnd = new Random(0);
......
122 122
    {
123 123
    mView = v;
124 124

  
125
    mQuad = new MeshFlat(1,1);
125
    mQuad = new MeshRectangles(1,1);
126 126

  
127 127
    mGFFAEffects            = new DistortedEffects();
128 128
    mLogoEffects            = new DistortedEffects();
src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
31 31
import org.distorted.library.main.DistortedNode;
32 32
import org.distorted.library.main.DistortedScreen;
33 33
import org.distorted.library.main.DistortedTexture;
34
import org.distorted.library.mesh.MeshFlat;
34
import org.distorted.library.mesh.MeshRectangles;
35 35
import org.distorted.library.type.Static1D;
36 36
import org.distorted.library.type.Static3D;
37 37
import org.distorted.library.type.Static4D;
......
74 74
      {
75 75
      mView = v;
76 76

  
77
      MeshFlat mesh = new MeshFlat(1,1);
77
      MeshRectangles mesh = new MeshRectangles(1,1);
78 78

  
79 79
      mQuat1 = new Static4D(0,0,0,1);  // unity
80 80
      mQuat2 = new Static4D(0,0,0,1);  // quaternions

Also available in: Unified diff