Revision 10b7e588
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java | ||
---|---|---|
27 | 27 |
|
28 | 28 |
import org.distorted.examples.R; |
29 | 29 |
|
30 |
import org.distorted.library.DistortedObjectTree; |
|
30 | 31 |
import org.distorted.library.EffectTypes; |
31 | 32 |
import org.distorted.library.type.Dynamic1D; |
32 |
import org.distorted.library.DistortedNode; |
|
33 | 33 |
import org.distorted.library.type.Static3D; |
34 | 34 |
import org.distorted.library.type.Static1D; |
35 | 35 |
import org.distorted.library.Distorted; |
36 |
import org.distorted.library.DistortedBitmapGrid;
|
|
36 |
import org.distorted.library.GridFlat;
|
|
37 | 37 |
import org.distorted.library.DistortedObject; |
38 | 38 |
|
39 | 39 |
import android.graphics.Bitmap; |
... | ... | |
50 | 50 |
private static final int NUM_LEAVES = 8; |
51 | 51 |
|
52 | 52 |
private GLSurfaceView mView; |
53 |
private DistortedNode mScreen;
|
|
53 |
private DistortedObjectTree mScreen;
|
|
54 | 54 |
private DistortedObject mLeaf; |
55 | 55 |
|
56 | 56 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
60 | 60 |
mView = v; |
61 | 61 |
|
62 | 62 |
mLeaf = new DistortedObject(LEAF_SIZE,LEAF_SIZE,1); |
63 |
DistortedBitmapGrid grid = new DistortedBitmapGrid(1,1);
|
|
63 |
GridFlat grid = new GridFlat(1,1);
|
|
64 | 64 |
|
65 |
mScreen = new DistortedNode(new DistortedObject(9*LEAF_SIZE,9*LEAF_SIZE,1), grid);
|
|
65 |
mScreen = new DistortedObjectTree(new DistortedObject(9*LEAF_SIZE,9*LEAF_SIZE,1), grid);
|
|
66 | 66 |
|
67 | 67 |
Dynamic1D rot = new Dynamic1D(5000,0.0f); |
68 | 68 |
rot.setMode(Dynamic1D.MODE_JUMP); |
69 | 69 |
rot.add(new Static1D( 0)); |
70 | 70 |
rot.add(new Static1D(360)); |
71 | 71 |
|
72 |
DistortedNode[] mCircleNode = new DistortedNode[NUM_CIRCLES];
|
|
72 |
DistortedObjectTree[] mCircleNode = new DistortedObjectTree[NUM_CIRCLES];
|
|
73 | 73 |
|
74 | 74 |
int[] colors = new int[] {0,0,1, 0,0,0, 1,0,0, 1,1,0, 0,1,0}; // blue, black, red, yellow, green |
75 | 75 |
int[] positions = new int[] {0*LEAF_SIZE,2*LEAF_SIZE, 3*LEAF_SIZE,2*LEAF_SIZE, 6*LEAF_SIZE,2*LEAF_SIZE, 3*LEAF_SIZE/2,9*LEAF_SIZE/2, 9*LEAF_SIZE/2,9*LEAF_SIZE/2}; |
... | ... | |
83 | 83 |
{ |
84 | 84 |
if( i==0 ) |
85 | 85 |
{ |
86 |
mCircleNode[i] = new DistortedNode(new DistortedObject(3*LEAF_SIZE,3*LEAF_SIZE,1), grid);
|
|
86 |
mCircleNode[i] = new DistortedObjectTree(new DistortedObject(3*LEAF_SIZE,3*LEAF_SIZE,1), grid);
|
|
87 | 87 |
|
88 | 88 |
for(int j=0; j<NUM_LEAVES; j++) |
89 | 89 |
{ |
... | ... | |
95 | 95 |
} |
96 | 96 |
else |
97 | 97 |
{ |
98 |
mCircleNode[i] = new DistortedNode(mCircleNode[0], Distorted.CLONE_BITMAP|Distorted.CLONE_CHILDREN);
|
|
98 |
mCircleNode[i] = new DistortedObjectTree(mCircleNode[0], Distorted.CLONE_BITMAP|Distorted.CLONE_CHILDREN);
|
|
99 | 99 |
} |
100 | 100 |
|
101 | 101 |
mScreen.attach(mCircleNode[i]); |
Also available in: Unified diff
Rename various classes; fix a bug in Around the World.