Project

General

Profile

« Previous | Next » 

Revision e8b6aa95

Added by Leszek Koltunski over 7 years ago

Major change in API: separate the GRID from DistortedObject; completely remove classes derived from DistortedObject.

View differences:

src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
31 31
import org.distorted.library.EffectTypes;
32 32
import org.distorted.library.type.Dynamic;
33 33
import org.distorted.library.type.DynamicQuat;
34
import org.distorted.library.DistortedCubes;
34
import org.distorted.library.DistortedCubesGrid;
35
import org.distorted.library.DistortedObject;
35 36
import org.distorted.library.type.Static4D;
36 37
import org.distorted.library.type.Static3D;
37 38
import org.distorted.library.Distorted;
......
49 50
  private static final int SIZE = 100;
50 51
	
51 52
  private GLSurfaceView mView;
52
  private DistortedCubes mCube;
53
  private DistortedObject mCube;
54
  private DistortedCubesGrid mGrid;
53 55

  
54 56
  private DynamicQuat mRot;
55 57
    
......
58 60
  QuaternionRenderer(GLSurfaceView v)
59 61
    {
60 62
    mView = v;
61
    mCube = new DistortedCubes( 3, "000010000", SIZE);
62
      
63
    mGrid = new DistortedCubesGrid( 3, "000010000", false);
64
    mCube = new DistortedObject(1,1,1);
65

  
63 66
    mRot = new DynamicQuat();
64 67

  
65 68
    Random rnd = new Random(System.currentTimeMillis());
......
87 90
  public void onDrawFrame(GL10 glUnused) 
88 91
    {
89 92
    GLES20.glClear( GLES20.GL_DEPTH_BUFFER_BIT | GLES20.GL_COLOR_BUFFER_BIT);
90
    mCube.draw(System.currentTimeMillis());
93
    mCube.draw(System.currentTimeMillis(), mGrid);
91 94
    }
92 95

  
93 96
///////////////////////////////////////////////////////////////////////////////////////////////////
......
134 137
      catch(IOException e) { }
135 138
      }  
136 139
      
137
    mCube.setBitmap(bitmap);
140
    mCube.setTexture(bitmap);
138 141
      
139 142
    try
140 143
      {

Also available in: Unified diff