Revision 65f622c1
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DActivity2.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
public class Effects3DActivity2 extends AppCompatActivity |
49 | 49 |
{ |
50 |
public static final int NUM_TABS = 3;
|
|
50 |
public static final int NUM_TABS = 4;
|
|
51 | 51 |
|
52 | 52 |
private int mNumCols; |
53 | 53 |
private int mNumRows; |
... | ... | |
267 | 267 |
|
268 | 268 |
public int getScreenWidth() |
269 | 269 |
{ |
270 |
return 0; |
|
270 |
Effects3DRenderer r = ((Effects3DSurfaceView)findViewById(R.id.effects3dSurfaceView)).getRenderer(); |
|
271 |
return r.getWidth(); |
|
271 | 272 |
} |
272 | 273 |
|
273 | 274 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
285 | 286 |
|
286 | 287 |
renderer.setCenter( mCenterX, mCenterY, mCenterZ ); |
287 | 288 |
renderer.setRegion( mRegionX, mRegionY, mRegionR ); |
288 |
renderer.mQuat1.set(0,0,0,1); |
|
289 |
renderer.mQuat2.set(0,0,0,1); |
|
290 | 289 |
} |
291 | 290 |
|
292 | 291 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
293 |
// 'second screen' methods |
|
292 |
|
|
293 |
void resetMatrixEffects() |
|
294 |
{ |
|
295 |
Effects3DSurfaceView view = findViewById(R.id.effects3dSurfaceView); |
|
296 |
Effects3DRenderer renderer= view.getRenderer(); |
|
297 |
|
|
298 |
renderer.resetMatrixEffects(); |
|
299 |
} |
|
300 |
|
|
294 | 301 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
295 | 302 |
|
296 | 303 |
public DistortedEffects getEffects() |
Also available in: Unified diff
Progress with Effects3D app - merge Matrix effects