Revision 24624a1a
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/inflate/InflateActivity2.java | ||
---|---|---|
35 | 35 |
import org.distorted.library.mesh.MeshBase; |
36 | 36 |
import org.distorted.library.mesh.MeshCubes; |
37 | 37 |
import org.distorted.library.mesh.MeshFlat; |
38 |
import org.distorted.library.mesh.MeshQuad; |
|
39 |
import org.distorted.library.mesh.MeshSphere; |
|
38 | 40 |
|
39 | 41 |
import java.io.IOException; |
40 | 42 |
import java.io.InputStream; |
... | ... | |
100 | 102 |
mNumSlic = b.getInt("slices"); |
101 | 103 |
mBitmapID = b.getInt("bitmap"); |
102 | 104 |
|
103 |
if( objectType==1 ) mMesh = new MeshFlat(mNumCols,mNumRows); |
|
104 |
else mMesh = new MeshCubes(mNumCols, str, mNumSlic); |
|
105 |
switch(objectType) |
|
106 |
{ |
|
107 |
case 0: mMesh = new MeshCubes(mNumCols, str, mNumSlic); |
|
108 |
break; |
|
109 |
case 1: mMesh = new MeshFlat(mNumCols,mNumRows); |
|
110 |
break; |
|
111 |
case 2: mMesh = new MeshSphere(mNumRows); |
|
112 |
break; |
|
113 |
case 3: mMesh = new MeshQuad(); |
|
114 |
break; |
|
115 |
} |
|
105 | 116 |
|
106 | 117 |
mTexture= new DistortedTexture(mNumCols,mNumRows); |
107 | 118 |
|
108 | 119 |
setContentView(R.layout.inflatelayout); |
109 | 120 |
|
110 |
mTextLevel = (TextView)findViewById(R.id.inflateText);
|
|
121 |
mTextLevel = findViewById(R.id.inflateText); |
|
111 | 122 |
SeekBar levelBar = findViewById(R.id.inflateLevel); |
112 | 123 |
levelBar.setOnSeekBarChangeListener(this); |
113 | 124 |
|
Also available in: Unified diff
Add support for MeshSphere (add ability to display it in the 'Effects3D' and 'Inflate' apps).
Still a bit buggy!