Revision e8b6aa95
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/cubes/CubesActivity.java | ||
---|---|---|
21 | 21 |
|
22 | 22 |
import org.distorted.library.Distorted; |
23 | 23 |
import org.distorted.examples.R; |
24 |
import org.distorted.library.DistortedCubes; |
|
25 | 24 |
import org.distorted.library.DistortedObject; |
25 |
import org.distorted.library.DistortedObjectGrid; |
|
26 |
import org.distorted.library.DistortedCubesGrid; |
|
26 | 27 |
|
27 | 28 |
import android.app.Activity; |
28 | 29 |
import android.opengl.GLSurfaceView; |
... | ... | |
48 | 49 |
private LinearLayout mLay; |
49 | 50 |
private boolean[] mShape; |
50 | 51 |
private DistortedObject mObject; |
52 |
private DistortedObjectGrid mGrid; |
|
51 | 53 |
|
52 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
53 | 55 |
|
... | ... | |
197 | 199 |
for(int i=0; i<mNumRows*mNumCols; i++) |
198 | 200 |
str += mShape[i] ? "1" : "0"; |
199 | 201 |
|
200 |
mObject = new DistortedCubes(mNumCols, str, 10); |
|
202 |
mGrid = new DistortedCubesGrid(mNumCols, str, false); |
|
203 |
mObject = new DistortedObject(mNumCols,mNumRows,1); |
|
201 | 204 |
|
202 | 205 |
setContentView(R.layout.cubeslayout); |
203 | 206 |
} |
... | ... | |
208 | 211 |
{ |
209 | 212 |
return mObject; |
210 | 213 |
} |
214 |
|
|
215 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
216 |
|
|
217 |
public DistortedObjectGrid getGrid() |
|
218 |
{ |
|
219 |
return mGrid; |
|
220 |
} |
|
211 | 221 |
} |
Also available in: Unified diff
Major change in API: separate the GRID from DistortedObject; completely remove classes derived from DistortedObject.