Revision 24624a1a
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DActivity2.java | ||
---|---|---|
39 | 39 |
import org.distorted.library.mesh.MeshCubes; |
40 | 40 |
import org.distorted.library.mesh.MeshFlat; |
41 | 41 |
import org.distorted.library.mesh.MeshBase; |
42 |
import org.distorted.library.mesh.MeshQuad; |
|
43 |
import org.distorted.library.mesh.MeshSphere; |
|
42 | 44 |
|
43 | 45 |
import java.io.IOException; |
44 | 46 |
import java.io.InputStream; |
... | ... | |
101 | 103 |
DistortedEffects.setMax(EffectType.VERTEX ,10); // those have to be called before |
102 | 104 |
DistortedEffects.setMax(EffectType.FRAGMENT,10); // any DistortedEffect get created! |
103 | 105 |
|
104 |
if( mObjectType==1 ) mMesh = new MeshFlat(mNumCols,mNumRows); |
|
105 |
else mMesh = new MeshCubes(mNumCols, mString, mNumSlic); |
|
106 |
switch(mObjectType) |
|
107 |
{ |
|
108 |
case 0: mMesh = new MeshCubes(mNumCols, mString, mNumSlic); |
|
109 |
break; |
|
110 |
case 1: mMesh = new MeshFlat(mNumCols,mNumRows); |
|
111 |
break; |
|
112 |
case 2: mMesh = new MeshSphere(mNumRows); |
|
113 |
break; |
|
114 |
case 3: mMesh = new MeshQuad(); |
|
115 |
break; |
|
116 |
} |
|
106 | 117 |
|
107 | 118 |
mMesh.setShowNormals(mShowNormal); |
108 | 119 |
mTexture= new DistortedTexture(mNumCols,mNumRows); |
Also available in: Unified diff
Add support for MeshSphere (add ability to display it in the 'Effects3D' and 'Inflate' apps).
Still a bit buggy!