Project

General

Profile

« Previous | Next » 

Revision 58e9e190

Added by Leszek Koltunski over 7 years ago

Change of API in anticipation for MeshCubes of any depth (currently only 0 and 1 work)

View differences:

src/main/java/org/distorted/examples/cubes/CubesActivity.java
200 200
      for(int i=0; i<mNumRows*mNumCols; i++)
201 201
        str += mShape[i] ? "1" : "0";
202 202

  
203
      mMesh = new MeshCubes(mNumCols, str, false);
203
      mMesh = new MeshCubes(mNumCols, str, 1);
204 204
      mTexture = new DistortedTexture(mNumCols,mNumRows);
205 205

  
206 206
      setContentView(R.layout.cubeslayout);
src/main/java/org/distorted/examples/effects3d/Effects3DActivity.java
425 425
      for(int i=0; i<mNumRows*mNumCols; i++)
426 426
        str += mShape[i] ? "1" : "0";
427 427

  
428
      mMesh = new MeshCubes(mNumCols, str, false);
428
      mMesh = new MeshCubes(mNumCols, str, 1);
429 429
      }
430 430

  
431 431
    mMesh.setShowNormals(mShowNormal);
src/main/java/org/distorted/examples/fbo/FBORenderer.java
170 170
      final int GRID = 10;
171 171

  
172 172
      if( mMeshFlat==null ) mMeshFlat = new MeshFlat(1,1);
173
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(GRID,GRID,false);
173
      if( mMeshCubes==null) mMeshCubes= new MeshCubes(GRID,GRID,1);
174 174

  
175 175
      mRoot = new DistortedNode(mLisaTexture, mEffects, mMeshFlat);
176 176
      mRoot.attach(mGridTexture,gridEffects,mMeshCubes);
src/main/java/org/distorted/examples/flag/FlagRenderer.java
95 95
      mEffects.wave(mWaveDyn, waveCenter, waveRegion);
96 96

  
97 97
      mScreen = new DistortedScreen(mView);
98
      mScreen.attach(mTexture,mEffects, new MeshCubes(50,30,false) );
98
      mScreen.attach(mTexture,mEffects, new MeshCubes(50,30,1) );
99 99
      }
100 100

  
101 101
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/examples/matrix3d/Matrix3DActivity.java
70 70
    createEffectNames();
71 71

  
72 72
    mEffects = new DistortedEffects();
73
    mMesh = new MeshCubes(1,1,false);
74
    mTexture= new DistortedTexture(100,100);
73
    mMesh    = new MeshCubes(1,1,1);
74
    mTexture = new DistortedTexture(100,100);
75 75

  
76 76
    setEffectView();
77 77
    }
src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java
148 148
      mBlurDynamic.add(mBlurVector);
149 149
      mPostEffects.blur(mBlurDynamic);
150 150

  
151
      MeshCubes mesh = new MeshCubes(1,1,false);
151
      MeshCubes mesh = new MeshCubes(1,1,1);
152 152

  
153 153
      mTex1 = new DistortedTexture(OBJ_SIZE,OBJ_SIZE);
154 154
      mTex2 = new DistortedTexture(OBJ_SIZE,OBJ_SIZE);
src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
64 64
    mView    = v;
65 65
    mTexture = new DistortedTexture(1,1);
66 66
    mEffects = new DistortedEffects();
67
    mMesh    = new MeshCubes(1,1,false);
67
    mMesh    = new MeshCubes(1,1,1);
68 68
    mRot     = new DynamicQuat();
69 69

  
70 70
    Random rnd = new Random(System.currentTimeMillis());
src/main/java/org/distorted/examples/stencil/StencilRenderer.java
85 85
      {
86 86
      mView = v;
87 87

  
88
      mCubeMesh = new MeshCubes(1,1,false);
88
      mCubeMesh = new MeshCubes(1,1,1);
89 89
      mQuad     = new MeshFlat(1,1);
90 90

  
91 91
      mCubeTex   = new DistortedTexture(1,1);
src/main/java/org/distorted/examples/wind/WindRenderer.java
21 21

  
22 22
import android.graphics.Bitmap;
23 23
import android.graphics.BitmapFactory;
24
import android.opengl.GLES30;
25 24
import android.opengl.GLSurfaceView;
26 25

  
27 26
import org.distorted.examples.R;
......
63 62
      mManager = new WindEffectsManager(mTexture);
64 63
      mScreen  = new DistortedScreen(mView);
65 64

  
66
      mScreen.attach(mTexture,mEffects,new MeshCubes(50,30,false));
65
      mScreen.attach(mTexture,mEffects,new MeshCubes(50,30,1));
67 66

  
68 67
      mObjWidth = mTexture.getWidth();
69 68
      mObjHeight= mTexture.getHeight();

Also available in: Unified diff