Project

General

Profile

« Previous | Next » 

Revision f2085b96

Added by Leszek Koltunski over 4 years ago

Rename Meshes.

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.MeshRectangles;
39
import org.distorted.library.mesh.MeshSquare;
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 MeshRectangles mMesh;
57
   private MeshSquare mMesh;
58 58
   private AroundTheWorldEffectsManager mManager;
59 59
   private Static3D mScaleMatrix, mScaleVertex;
60 60

  
......
130 130
      if( mTexture==null ) mTexture = new DistortedTexture();
131 131
      mTexture.setTexture(bitmap);
132 132

  
133
      if( mMesh==null ) mMesh = new MeshRectangles(30,30*objHeight/objWidth);
133
      if( mMesh==null ) mMesh = new MeshSquare(30,30*objHeight/objWidth);
134 134

  
135 135
      mScreen.detachAll();
136 136
      mScreen.attach(mTexture, mEffects, mMesh);
src/main/java/org/distorted/examples/bean/BeanRenderer.java
33 33
import org.distorted.library.main.DistortedScreen;
34 34
import org.distorted.library.main.DistortedLibrary;
35 35
import org.distorted.library.main.DistortedTexture;
36
import org.distorted.library.mesh.MeshRectangles;
36
import org.distorted.library.mesh.MeshSquare;
37 37
import org.distorted.library.type.Dynamic3D;
38 38
import org.distorted.library.type.Static3D;
39 39
import org.distorted.library.type.Static4D;
......
50 50
   private DistortedEffects mEffects;
51 51
   private DistortedScreen mScreen;
52 52
   private DistortedTexture mTexture;
53
   private MeshRectangles mMesh;
53
   private MeshSquare mMesh;
54 54
   private Static3D mScale;
55 55
   private float mBmpRatio;
56 56

  
......
155 155

  
156 156
     yLoc[height] = (height-(height-1)*PART)/height;
157 157

  
158
     if( mMesh==null ) mMesh = new MeshRectangles(xLoc,yLoc);
158
     if( mMesh==null ) mMesh = new MeshSquare(xLoc,yLoc);
159 159

  
160 160
     mScreen.detachAll();
161 161
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/blur/BlurRenderer.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.MeshRectangles;
35
import org.distorted.library.mesh.MeshSquare;
36 36
import org.distorted.library.type.Dynamic2D;
37 37
import org.distorted.library.type.Static2D;
38 38
import org.distorted.library.type.Static3D;
......
55 55
    private DistortedEffects mEffects, mBufferEffects;
56 56
    private DistortedScreen mScreen;
57 57
    private DistortedFramebuffer mBuffer;
58
    private MeshRectangles mMesh, mMeshBuffer;
58
    private MeshSquare mMesh, mMeshBuffer;
59 59
    private Static2D mHaloRadiusSta;
60 60
    private Static3D mMove, mScale, mBufferScale;
61 61

  
......
64 64
   BlurRenderer(GLSurfaceView v)
65 65
      {
66 66
      mView       = v;
67
      mMesh       = new MeshRectangles(1,1);
68
      mMeshBuffer = new MeshRectangles(1,1);
67
      mMesh       = new MeshSquare(1,1);
68
      mMeshBuffer = new MeshSquare(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/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.MeshRectangles;
40
import org.distorted.library.mesh.MeshSquare;
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 MeshRectangles mMesh;
66
    private MeshSquare mMesh;
67 67
    private DistortedScreen mScreen;
68 68
    private int mObjHeight, mObjWidth;
69 69
    private Static3D mScaleMatrix, mScaleVertex, mSwirl1, mSwirl2, mDeform1, mDeform2;
......
189 189
      mRadius.set(mObjWidth*0.5f);
190 190
      mScaleVertex.set(mObjWidth,mObjHeight,0);
191 191

  
192
      if( mMesh   ==null ) mMesh = new MeshRectangles(30,30*mObjHeight/mObjWidth);
192
      if( mMesh   ==null ) mMesh = new MeshSquare(30,30*mObjHeight/mObjWidth);
193 193
      if( mTexture==null ) mTexture = new DistortedTexture();
194 194
      mTexture.setTexture(bitmap);
195 195

  
src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.mesh.MeshBase;
38 38
import org.distorted.library.mesh.MeshJoined;
39
import org.distorted.library.mesh.MeshTriangles;
39
import org.distorted.library.mesh.MeshTriangle;
40 40
import org.distorted.library.type.Dynamic1D;
41 41
import org.distorted.library.type.DynamicQuat;
42 42
import org.distorted.library.type.Static1D;
......
160 160
      {
161 161
      final int MESHES=4;
162 162

  
163
      MeshBase[] meshes = new MeshTriangles[MESHES];
163
      MeshBase[] meshes = new MeshTriangle[MESHES];
164 164
      VertexEffectMove[] moveEffect = new VertexEffectMove[MESHES];
165 165

  
166
      meshes[0] = new MeshTriangles(1);
166
      meshes[0] = new MeshTriangle(1);
167 167
      meshes[0].setEffectAssociation(0,1,0);
168 168

  
169 169
      for(int i=1; i<MESHES; i++)
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.MeshRectangles;
35
import org.distorted.library.mesh.MeshSquare;
36 36

  
37 37
import org.distorted.library.message.EffectListener;
38 38
import org.distorted.library.type.Dynamic3D;
......
198 198
     textureHeight= (int)(0.6f*height);
199 199

  
200 200
     if( mMesh!=null ) mMesh.markForDeletion();
201
     mMesh = new MeshRectangles(50,50*textureHeight/textureWidth);
201
     mMesh = new MeshSquare(50,50*textureHeight/textureWidth);
202 202

  
203 203
     mScale.set(textureWidth,textureHeight,1);
204 204

  
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java
36 36
import org.distorted.library.main.DistortedScreen;
37 37
import org.distorted.library.main.DistortedTexture;
38 38
import org.distorted.library.main.DistortedEffects;
39
import org.distorted.library.mesh.MeshRectangles;
39
import org.distorted.library.mesh.MeshSquare;
40 40
import org.distorted.library.type.Dynamic3D;
41 41
import org.distorted.library.type.Static1D;
42 42
import org.distorted.library.type.Static3D;
......
56 56
   private GLSurfaceView mView;
57 57
   private DistortedEffects[] mEffects;
58 58
   private DistortedTexture[] mTexture;
59
   private MeshRectangles mMesh;
59
   private MeshSquare mMesh;
60 60
   private DistortedScreen mScreen;
61 61
   private Static3D mScaleMatrix, mScaleVertex;
62 62
   private Static3D[] mMove;
......
159 159
       mTexture[i].setTexture(bmp[i]);
160 160
       }
161 161

  
162
     if( mMesh==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
162
     if( mMesh==null ) mMesh = new MeshSquare(30,30*bmpHeight/bmpWidth);
163 163

  
164 164
     mScreen.detachAll();
165 165
     for(int i=NUM-1; i>=0; i--) mScreen.attach(mTexture[i], mEffects[i], mMesh);
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.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.MeshRectangles;
39
import org.distorted.library.mesh.MeshSquare;
40 40
import org.distorted.library.main.DistortedTexture;
41 41
import org.distorted.library.type.Dynamic1D;
42 42
import org.distorted.library.type.Dynamic3D;
......
57 57
   private GLSurfaceView mView;
58 58
   private DistortedEffects[] mEffects;
59 59
   private DistortedTexture mTexture;
60
   private MeshRectangles mMesh;
60
   private MeshSquare mMesh;
61 61
   private DistortedScreen mScreen;
62 62
   private Static3D mScale, mScaleBitmap;
63 63
   private Static3D[] mMove;
......
176 176

  
177 177
     mScaleBitmap.set(mBmpWidth,mBmpHeight,0);
178 178

  
179
     if( mMesh   ==null ) mMesh = new MeshRectangles(30,30*mBmpHeight/mBmpWidth);
179
     if( mMesh   ==null ) mMesh = new MeshSquare(30,30*mBmpHeight/mBmpWidth);
180 180
     if( mTexture==null ) mTexture  = new DistortedTexture();
181 181
     mTexture.setTexture(bitmap);
182 182

  
src/main/java/org/distorted/examples/dynamic/DynamicRenderer.java
31 31
import org.distorted.library.effect.MatrixEffectScale;
32 32
import org.distorted.library.main.DistortedEffects;
33 33
import org.distorted.library.main.DistortedScreen;
34
import org.distorted.library.mesh.MeshRectangles;
34
import org.distorted.library.mesh.MeshSquare;
35 35
import org.distorted.library.main.DistortedTexture;
36 36
import org.distorted.library.main.DistortedLibrary;
37 37
import org.distorted.library.type.Static3D;
......
44 44
   private DistortedTexture mTexture;
45 45
   private DistortedEffects mEffects;
46 46
   private DistortedScreen mScreen;
47
   private MeshRectangles mMesh;
47
   private MeshSquare mMesh;
48 48
   private Canvas mCanvas;
49 49
   private Bitmap mBitmap;
50 50
   private Paint mPaint;
......
62 62
     mPaint.setStyle(Style.FILL);
63 63
      
64 64
     mView    = v;
65
     mMesh    = new MeshRectangles(1,1);
65
     mMesh    = new MeshSquare(1,1);
66 66
     mScreen  = new DistortedScreen();
67 67
     mEffects = new DistortedEffects();
68 68
     mTexture = new DistortedTexture();
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.MeshRectangles;
40
import org.distorted.library.mesh.MeshSquare;
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 MeshRectangles mMesh;
60
  private MeshSquare 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 MeshRectangles(MESH_QUALITY,MESH_QUALITY*texHeight/texWidth);
80
    mMesh = new MeshSquare(MESH_QUALITY,MESH_QUALITY*texHeight/texWidth);
81 81

  
82 82
    mTexture = new DistortedTexture();
83 83
    mEffects = new DistortedEffects();
src/main/java/org/distorted/examples/generic/GenericMeshList.java
22 22
import org.distorted.library.mesh.MeshBase;
23 23
import org.distorted.library.mesh.MeshCubes;
24 24
import org.distorted.library.mesh.MeshQuad;
25
import org.distorted.library.mesh.MeshRectangles;
25
import org.distorted.library.mesh.MeshSquare;
26 26
import org.distorted.library.mesh.MeshSphere;
27
import org.distorted.library.mesh.MeshTriangles;
27
import org.distorted.library.mesh.MeshTriangle;
28 28
import org.distorted.library.type.Static4D;
29 29

  
30 30
///////////////////////////////////////////////////////////////////////////////////////////////////
......
162 162
                         mesh = new MeshCubes(cols, str, slic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
163 163
                         }
164 164
                       break;
165
      case Rectangles: mesh = new MeshRectangles(cols,rows);
165
      case Rectangles: mesh = new MeshSquare(cols,rows);
166 166
                       break;
167 167
      case Sphere    : mesh = new MeshSphere(rows);
168 168
                       break;
169 169
      case Quad      : mesh = new MeshQuad();
170 170
                       break;
171
      case Triangles : mesh = new MeshTriangles(rows);
171
      case Triangles : mesh = new MeshTriangle(rows);
172 172
                       break;
173 173
      default:         mesh = null;
174 174
                       android.util.Log.e("Meshes", "Error: unimplemented Mesh!");
src/main/java/org/distorted/examples/girl/GirlRenderer.java
35 35
import org.distorted.library.effect.VertexEffectSwirl;
36 36
import org.distorted.library.main.DistortedLibrary;
37 37
import org.distorted.library.main.DistortedScreen;
38
import org.distorted.library.mesh.MeshRectangles;
38
import org.distorted.library.mesh.MeshSquare;
39 39
import org.distorted.library.main.DistortedTexture;
40 40
import org.distorted.library.main.DistortedEffects;
41 41
import org.distorted.library.type.Dynamic1D;
......
56 56
    private DistortedEffects mEffects;
57 57
    private DistortedScreen mScreen;
58 58
    private DistortedTexture mTexture;
59
    private MeshRectangles mMesh;
59
    private MeshSquare mMesh;
60 60
    private Static3D v0,v1,v2,v3;
61 61
    private Static1D dBegin, dMiddle, dEnd, s0;
62 62
    private Static3D mScaleMatrix, mScaleVertex;
......
200 200

  
201 201
     mScaleVertex.set(1.0f,mBmpRatio,1.0f);
202 202

  
203
     if( mMesh==null ) mMesh = new MeshRectangles(30, (int)(30*mBmpRatio));
203
     if( mMesh==null ) mMesh = new MeshSquare(30, (int)(30*mBmpRatio));
204 204

  
205 205
     mScreen.detachAll();
206 206
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/inflate/InflateMeshList.java
22 22
import org.distorted.library.mesh.MeshBase;
23 23
import org.distorted.library.mesh.MeshCubes;
24 24
import org.distorted.library.mesh.MeshQuad;
25
import org.distorted.library.mesh.MeshRectangles;
25
import org.distorted.library.mesh.MeshSquare;
26 26
import org.distorted.library.mesh.MeshSphere;
27
import org.distorted.library.mesh.MeshTriangles;
27
import org.distorted.library.mesh.MeshTriangle;
28 28
import org.distorted.library.type.Static4D;
29 29

  
30 30
///////////////////////////////////////////////////////////////////////////////////////////////////
......
162 162
                         mesh = new MeshCubes(cols, str, slic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
163 163
                         }
164 164
                       break;
165
      case Rectangles: mesh = new MeshRectangles(cols,rows);
165
      case Rectangles: mesh = new MeshSquare(cols,rows);
166 166
                       break;
167 167
      case Sphere    : mesh = new MeshSphere(rows);
168 168
                       break;
169 169
      case Quad      : mesh = new MeshQuad();
170 170
                       break;
171
      case Triangles : mesh = new MeshTriangles(rows);
171
      case Triangles : mesh = new MeshTriangle(rows);
172 172
                       break;
173 173
      default:         mesh = null;
174 174
                       android.util.Log.e("Meshes", "Error: unimplemented Mesh!");
src/main/java/org/distorted/examples/listener/ListenerRenderer.java
33 33
import org.distorted.library.effect.VertexEffectDistort;
34 34
import org.distorted.library.main.DistortedLibrary;
35 35
import org.distorted.library.main.DistortedScreen;
36
import org.distorted.library.mesh.MeshRectangles;
36
import org.distorted.library.mesh.MeshSquare;
37 37
import org.distorted.library.main.DistortedTexture;
38 38
import org.distorted.library.main.DistortedEffects;
39 39
import org.distorted.library.type.Dynamic3D;
......
56 56
   private DistortedEffects mEffects;
57 57
   private DistortedScreen mScreen;
58 58
   private DistortedTexture mTexture;
59
   private MeshRectangles mMesh;
59
   private MeshSquare mMesh;
60 60
   private Random mRnd;
61 61
   private Static3D mScale;
62 62
   private float mBmpRatio;
......
168 168
     mBmpRatio = (float)bitmap.getHeight()/bitmap.getWidth();
169 169
     mTexture.setTexture(bitmap);
170 170

  
171
     if( mMesh==null ) mMesh = new MeshRectangles(50, (int)(50*mBmpRatio) );
171
     if( mMesh==null ) mMesh = new MeshSquare(50, (int)(50*mBmpRatio) );
172 172

  
173 173
     mScreen.detachAll();
174 174
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java
38 38
import org.distorted.library.main.DistortedTexture;
39 39
import org.distorted.library.mesh.MeshBase;
40 40
import org.distorted.library.mesh.MeshJoined;
41
import org.distorted.library.mesh.MeshTriangles;
41
import org.distorted.library.mesh.MeshTriangle;
42 42
import org.distorted.library.type.Dynamic1D;
43 43
import org.distorted.library.type.DynamicQuat;
44 44
import org.distorted.library.type.Static1D;
......
210 210
      final int MESHES=4;
211 211

  
212 212
      int andAssoc = 1;
213
      MeshBase[] meshes = new MeshTriangles[MESHES];
213
      MeshBase[] meshes = new MeshTriangle[MESHES];
214 214

  
215 215
      for(int i=0; i<MESHES; i++)
216 216
        {
217
        meshes[i] = new MeshTriangles(5);
217
        meshes[i] = new MeshTriangle(5);
218 218
        meshes[i].setEffectAssociation(0,andAssoc,0);
219 219
        andAssoc <<= 1;
220 220
        }
src/main/java/org/distorted/examples/monalisa/MonaLisaRenderer.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.MeshRectangles;
35
import org.distorted.library.mesh.MeshSquare;
36 36
import org.distorted.library.type.Dynamic3D;
37 37
import org.distorted.library.type.Static3D;
38 38
import org.distorted.library.type.Static4D;
......
48 48
    private GLSurfaceView mView;
49 49
    private DistortedEffects mEffects;
50 50
    private DistortedTexture mTexture;
51
    private MeshRectangles mMesh;
51
    private MeshSquare mMesh;
52 52
    private DistortedScreen mScreen;
53 53
    private Static3D mScale;
54 54
    private float mBmpRatio;
......
146 146
      // effect to have vertices to distort. We multiply by mBmpRatio here so
147 147
      // that the Mesh's cells are as close to squares as possible (when they
148 148
      // finally be rendered with a Scale - see mScale)
149
      if( mMesh==null ) mMesh = new MeshRectangles(9, (int)(9*mBmpRatio) );
149
      if( mMesh==null ) mMesh = new MeshSquare(9, (int)(9*mBmpRatio) );
150 150

  
151 151
      // Every time activity goes to background, its OpenGL resources - including
152 152
      // Textures - get deleted. We always need to call setTexture() here to
src/main/java/org/distorted/examples/movingeffects/MovingEffectsRenderer.java
41 41
import org.distorted.library.main.DistortedScreen;
42 42
import org.distorted.library.main.DistortedTexture;
43 43
import org.distorted.library.main.DistortedEffects;
44
import org.distorted.library.mesh.MeshRectangles;
44
import org.distorted.library.mesh.MeshSquare;
45 45
import org.distorted.library.type.Static3D;
46 46

  
47 47
///////////////////////////////////////////////////////////////////////////////////////////////////
......
57 57
   private DistortedEffects mEffects;
58 58
   private DistortedTexture mTexture;
59 59
   private DistortedScreen mScreen;
60
   private MeshRectangles mMesh;
60
   private MeshSquare mMesh;
61 61
   private boolean mRefresh;
62 62
   private Static3D mScaleMatrix, mScaleVertex;
63 63

  
......
157 157
     mCanvas  = new Canvas(mBitmap);
158 158

  
159 159
     if( mMesh!=null ) mMesh.markForDeletion();
160
     mMesh = new MeshRectangles(80,80*texH/texW);
160
     mMesh = new MeshSquare(80,80*texH/texW);
161 161

  
162 162
     mScreen.detachAll();
163 163
     mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/predeform/PredeformMeshList.java
22 22
import org.distorted.library.mesh.MeshBase;
23 23
import org.distorted.library.mesh.MeshCubes;
24 24
import org.distorted.library.mesh.MeshQuad;
25
import org.distorted.library.mesh.MeshRectangles;
25
import org.distorted.library.mesh.MeshSquare;
26 26
import org.distorted.library.mesh.MeshSphere;
27
import org.distorted.library.mesh.MeshTriangles;
27
import org.distorted.library.mesh.MeshTriangle;
28 28
import org.distorted.library.type.Static4D;
29 29

  
30 30
///////////////////////////////////////////////////////////////////////////////////////////////////
......
162 162
                         mesh = new MeshCubes(cols, str, slic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB);
163 163
                         }
164 164
                       break;
165
      case Rectangles: mesh = new MeshRectangles(cols,rows);
165
      case Rectangles: mesh = new MeshSquare(cols,rows);
166 166
                       break;
167 167
      case Sphere    : mesh = new MeshSphere(rows);
168 168
                       break;
169 169
      case Quad      : mesh = new MeshQuad();
170 170
                       break;
171
      case Triangles : mesh = new MeshTriangles(rows);
171
      case Triangles : mesh = new MeshTriangle(rows);
172 172
                       break;
173 173
      default:         mesh = null;
174 174
                       android.util.Log.e("Meshes", "Error: unimplemented Mesh!");
src/main/java/org/distorted/examples/projection/ProjectionRenderer.java
27 27
import org.distorted.library.main.DistortedLibrary;
28 28
import org.distorted.library.main.DistortedEffects;
29 29
import org.distorted.library.main.DistortedScreen;
30
import org.distorted.library.mesh.MeshRectangles;
30
import org.distorted.library.mesh.MeshSquare;
31 31
import org.distorted.library.main.DistortedTexture;
32 32
import org.distorted.library.type.Static1D;
33 33
import org.distorted.library.type.Static3D;
......
46 46
   private GLSurfaceView mView;
47 47
   private DistortedEffects mEffects;
48 48
   private DistortedScreen mScreen;
49
   private MeshRectangles mMesh;
49
   private MeshSquare mMesh;
50 50
   private DistortedTexture mTexture;
51 51
   private float mF, mNear;
52 52
   private Static3D mScale;
......
133 133
      mTexture.setTexture(bmp);
134 134

  
135 135
      if( mMesh!=null )  mMesh.markForDeletion();
136
      mMesh = new MeshRectangles(100,100*height/width);
136
      mMesh = new MeshSquare(100,100*height/width);
137 137

  
138 138
      mScreen.detachAll();
139 139
      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.MeshRectangles;
40
import org.distorted.library.mesh.MeshSquare;
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 MeshRectangles mMesh;
61
  private MeshSquare mMesh;
62 62
  private DistortedScreen mScreen;
63 63
  private Static1D s0;
64 64
  private Static3D mScaleFactor, mScaleMain, mScaleVertex;
......
234 234

  
235 235
    mScaleVertex.set(bmpWidth,bmpHeight,0);
236 236

  
237
    if( mMesh   ==null ) mMesh = new MeshRectangles(30,30*bmpHeight/bmpWidth);
237
    if( mMesh   ==null ) mMesh = new MeshSquare(30,30*bmpHeight/bmpWidth);
238 238
    if( mTexture==null ) mTexture = new DistortedTexture();
239 239
    mTexture.setTexture(bitmap);
240 240

  
src/main/java/org/distorted/examples/singlemesh/SingleMeshRenderer.java
38 38
import org.distorted.library.main.DistortedTexture;
39 39
import org.distorted.library.mesh.MeshBase;
40 40
import org.distorted.library.mesh.MeshJoined;
41
import org.distorted.library.mesh.MeshRectangles;
41
import org.distorted.library.mesh.MeshSquare;
42 42
import org.distorted.library.type.Dynamic1D;
43 43
import org.distorted.library.type.DynamicQuat;
44 44
import org.distorted.library.type.Static1D;
......
247 247
      {
248 248
      final int MESHES=6;
249 249
      int association = 1;
250
      MeshBase[] meshes = new MeshRectangles[MESHES];
251
      meshes[0] = new MeshRectangles(10,10);
250
      MeshBase[] meshes = new MeshSquare[MESHES];
251
      meshes[0] = new MeshSquare(10,10);
252 252
      meshes[0].setEffectAssociation(0,association,0);
253 253

  
254 254
      for(int i=1; i<MESHES; i++)
src/main/java/org/distorted/examples/sink/SinkRenderer.java
32 32
import org.distorted.library.main.DistortedLibrary;
33 33
import org.distorted.library.main.DistortedEffects;
34 34
import org.distorted.library.main.DistortedScreen;
35
import org.distorted.library.mesh.MeshRectangles;
35
import org.distorted.library.mesh.MeshSquare;
36 36
import org.distorted.library.main.DistortedTexture;
37 37
import org.distorted.library.type.Dynamic1D;
38 38
import org.distorted.library.type.Static1D;
......
51 51
  private DistortedEffects mEffects;
52 52
  private DistortedScreen mScreen;
53 53
  private DistortedTexture mTexture;
54
  private MeshRectangles mMesh;
54
  private MeshSquare mMesh;
55 55
  private Static3D mScale;
56 56
  private float mBmpRatio;
57 57

  
......
119 119

  
120 120
    mTexture.setTexture(bitmap);
121 121

  
122
    if( mMesh==null ) mMesh = new MeshRectangles(30,(int)(30*mBmpRatio));
122
    if( mMesh==null ) mMesh = new MeshSquare(30,(int)(30*mBmpRatio));
123 123

  
124 124
    mScreen.detachAll();
125 125
    mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/surfaceview/RenderThread.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.MeshRectangles;
38
import org.distorted.library.mesh.MeshSquare;
39 39
import org.distorted.library.main.DistortedTexture;
40 40
import org.distorted.library.type.Dynamic3D;
41 41
import org.distorted.library.type.Static3D;
......
65 65

  
66 66
  private DistortedEffects mEffects;
67 67
  private DistortedTexture mTexture;
68
  private MeshRectangles mMesh;
68
  private MeshSquare mMesh;
69 69
  private DistortedScreen mScreen;
70 70
  private SurfaceView mView;
71 71
  private static boolean resourcesCreated = false;
......
247 247
    if( mTexture==null ) mTexture = new DistortedTexture();
248 248
    mTexture.setTexture(bmp);
249 249

  
250
    if( mMesh==null ) mMesh = new MeshRectangles(9,(int)(9*mBmpRatio));
250
    if( mMesh==null ) mMesh = new MeshSquare(9,(int)(9*mBmpRatio));
251 251

  
252 252
    mScreen.detachAll();
253 253
    mScreen.attach(mTexture,mEffects,mMesh);
src/main/java/org/distorted/examples/transparency/TransparencyRenderer.java
32 32
import org.distorted.library.main.DistortedNode;
33 33
import org.distorted.library.main.DistortedScreen;
34 34
import org.distorted.library.main.DistortedTexture;
35
import org.distorted.library.mesh.MeshRectangles;
35
import org.distorted.library.mesh.MeshSquare;
36 36
import org.distorted.library.type.Static1D;
37 37
import org.distorted.library.type.Static2D;
38 38
import org.distorted.library.type.Static3D;
......
76 76
      {
77 77
      mView = v;
78 78

  
79
      MeshRectangles mesh = new MeshRectangles(1,1);
79
      MeshSquare mesh = new MeshSquare(1,1);
80 80

  
81 81
      mQuat1 = new Static4D(0,0,0,1);  // unity
82 82
      mQuat2 = new Static4D(0,0,0,1);  // quaternions

Also available in: Unified diff