Revision 698ad0a8
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/generic/GenericActivity2.java | ||
---|---|---|
80 | 80 |
mShowNormal = false; |
81 | 81 |
mUseOIT = false; |
82 | 82 |
|
83 |
mEffects= new DistortedEffects(1);
|
|
83 |
mEffects= new DistortedEffects(); |
|
84 | 84 |
|
85 | 85 |
int maxsize = numCols > numRows ? (numCols>numSlic ? numCols:numSlic) : (numRows>numSlic ? numRows:numSlic) ; |
86 | 86 |
|
... | ... | |
100 | 100 |
|
101 | 101 |
mMesh = new MeshCubes(numCols, str, numSlic, mapFB, mapFB, mapLR, mapLR, mapTB, mapTB); |
102 | 102 |
} |
103 |
mEffects.setStretch(numCols,numRows,numSlic);
|
|
103 |
mMesh.setStretch(numCols,numRows,numSlic);
|
|
104 | 104 |
break; |
105 | 105 |
case 1: mMesh = new MeshRectangles(numCols,numRows); |
106 |
mEffects.setStretch(numCols,numRows,0);
|
|
106 |
mMesh.setStretch(numCols,numRows,0);
|
|
107 | 107 |
break; |
108 | 108 |
case 2: mMesh = new MeshSphere(numRows); |
109 |
mEffects.setStretch(numRows,numRows,numRows);
|
|
109 |
mMesh.setStretch(numRows,numRows,numRows);
|
|
110 | 110 |
break; |
111 | 111 |
case 3: mMesh = new MeshQuad(); |
112 |
mMesh.setStretch(1,1,0); |
|
112 | 113 |
break; |
113 | 114 |
} |
114 | 115 |
|
... | ... | |
206 | 207 |
|
207 | 208 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
208 | 209 |
|
209 |
public int getWidth()
|
|
210 |
public float getWidth()
|
|
210 | 211 |
{ |
211 |
return mEffects==null ? 0: mEffects.getStartchX();
|
|
212 |
return mMesh==null ? 0: mMesh.getStretchX();
|
|
212 | 213 |
} |
213 | 214 |
|
214 | 215 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
215 | 216 |
|
216 |
public int getHeight()
|
|
217 |
public float getHeight()
|
|
217 | 218 |
{ |
218 |
return mEffects==null ? 0: mEffects.getStartchY();
|
|
219 |
return mMesh==null ? 0: mMesh.getStretchY();
|
|
219 | 220 |
} |
220 | 221 |
|
221 | 222 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
222 | 223 |
|
223 |
public int getDepth()
|
|
224 |
public float getDepth()
|
|
224 | 225 |
{ |
225 |
return mEffects==null ? 0: mEffects.getStartchZ();
|
|
226 |
return mMesh==null ? 0: mMesh.getStretchZ();
|
|
226 | 227 |
} |
227 | 228 |
|
228 | 229 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Move the Effects.setStretch to Meshbase.setStretch