62 |
62 |
private int distortX, distortY, distortZ;
|
63 |
63 |
private int sinkA;
|
64 |
64 |
private int swirlA;
|
65 |
|
|
66 |
|
private int maxX, maxY, maxZ;
|
67 |
65 |
|
68 |
66 |
private float fdeformX, fdeformY, fdeformZ;
|
69 |
67 |
private float fdistortX, fdistortY, fdistortZ;
|
... | ... | |
346 |
344 |
|
347 |
345 |
private void computeDeform()
|
348 |
346 |
{
|
349 |
|
fdeformX = (deformX-50)*maxX/50.0f;
|
350 |
|
fdeformY = (deformY-50)*maxY/50.0f;
|
351 |
|
fdeformZ = (deformZ-50)*maxZ/50.0f;
|
|
347 |
fdeformX = (deformX-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
|
348 |
fdeformY = (deformY-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
|
349 |
fdeformZ = (deformZ-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
352 |
350 |
|
353 |
351 |
Vertex3DRenderer.setDeform( fdeformX, fdeformY, fdeformZ );
|
354 |
352 |
}
|
... | ... | |
368 |
366 |
|
369 |
367 |
private void computeDistort()
|
370 |
368 |
{
|
371 |
|
fdistortX = (distortX-50)*maxX/50.0f;
|
372 |
|
fdistortY = (distortY-50)*maxY/50.0f;
|
373 |
|
fdistortZ = (distortZ-50)*maxZ/50.0f;
|
|
369 |
fdistortX = (distortX-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
|
370 |
fdistortY = (distortY-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
|
371 |
fdistortZ = (distortZ-50)*Vertex3DRenderer.mScreenMin/50.0f;
|
374 |
372 |
|
375 |
373 |
Vertex3DRenderer.setDistort(fdistortX, fdistortY, fdistortZ);
|
376 |
374 |
}
|
... | ... | |
457 |
455 |
|
458 |
456 |
if( hasFocus ) setGrid();
|
459 |
457 |
}
|
460 |
|
else
|
461 |
|
{
|
462 |
|
GLSurfaceView mView = (GLSurfaceView) this.findViewById(R.id.vertex3dSurfaceView);
|
463 |
|
|
464 |
|
maxX = mView.getWidth();
|
465 |
|
maxY = mView.getHeight();
|
466 |
|
maxZ = (maxX+maxY)/2;
|
467 |
|
}
|
468 |
458 |
}
|
469 |
459 |
|
470 |
460 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
Progress with Vertex3D