Revision 8eed34d3
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/effectqueue/EffectQueueSurfaceView.java | ||
---|---|---|
38 | 38 |
import org.distorted.library.type.Static4D; |
39 | 39 |
import org.distorted.library.type.Dynamic3D; |
40 | 40 |
|
41 |
import static org.distorted.examples.effectqueue.EffectQueueRenderer.*; |
|
42 |
|
|
41 | 43 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
42 | 44 |
|
43 | 45 |
public class EffectQueueSurfaceView extends GLSurfaceView |
... | ... | |
135 | 137 |
|
136 | 138 |
switch(action) |
137 | 139 |
{ |
138 |
case MotionEvent.ACTION_DOWN: x = (int)event.getX()* EffectQueueRenderer.BWID/mScrW;
|
|
139 |
y = EffectQueueRenderer.BHEI-(int)event.getY()* EffectQueueRenderer.BHEI/mScrH;
|
|
140 |
case MotionEvent.ACTION_DOWN: x = (int)event.getX()*BWID/mScrW - BWID/2;
|
|
141 |
y = BHEI/2 - (int)event.getY()*BHEI/mScrH;
|
|
140 | 142 |
EffectQueueActivity act = (EffectQueueActivity)getContext(); |
141 | 143 |
Static3D center = new Static3D(x,y,0); |
142 | 144 |
|
Also available in: Unified diff
Moving the Vertex and Fragment centers of effect to the center of the Mesh.