Revision 7589635e
Added by Leszek Koltunski almost 8 years ago
src/main/java/org/distorted/examples/scratchpad/ScratchpadSurfaceView.java | ||
---|---|---|
25 | 25 |
import android.view.MotionEvent; |
26 | 26 |
import android.util.AttributeSet; |
27 | 27 |
|
28 |
import org.distorted.library.type.Float2D;
|
|
29 |
import org.distorted.library.type.Float3D;
|
|
30 |
import org.distorted.library.type.Float4D;
|
|
31 |
import org.distorted.library.type.Interpolator3D;
|
|
28 |
import org.distorted.library.type.Static2D;
|
|
29 |
import org.distorted.library.type.Static3D;
|
|
30 |
import org.distorted.library.type.Static4D;
|
|
31 |
import org.distorted.library.type.Dynamic3D;
|
|
32 | 32 |
|
33 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
34 | 34 |
|
... | ... | |
40 | 40 |
private static float mCount; |
41 | 41 |
private static int mScrW, mScrH; |
42 | 42 |
|
43 |
private static Float4D region;
|
|
44 |
private static Float2D point;
|
|
43 |
private static Static4D region;
|
|
44 |
private static Static2D point;
|
|
45 | 45 |
|
46 |
private static Interpolator3D di;
|
|
47 |
private static Float3D v0, v1, v2, v3;
|
|
46 |
private static Dynamic3D di;
|
|
47 |
private static Static3D v0, v1, v2, v3;
|
|
48 | 48 |
|
49 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
50 | 50 |
|
... | ... | |
55 | 55 |
mDuration = 10000; |
56 | 56 |
mCount = 1.0f; |
57 | 57 |
|
58 |
di = new Interpolator3D();
|
|
58 |
di = new Dynamic3D();
|
|
59 | 59 |
|
60 | 60 |
di.setDuration(mDuration); |
61 | 61 |
di.setCount(mCount); |
... | ... | |
75 | 75 |
mRenderer = new ScratchpadRenderer(this); |
76 | 76 |
setRenderer(mRenderer); |
77 | 77 |
|
78 |
point = new Float2D(0,0);
|
|
79 |
region= new Float4D(0,0,60,60);
|
|
78 |
point = new Static2D(0,0);
|
|
79 |
region= new Static4D(0,0,60,60);
|
|
80 | 80 |
|
81 | 81 |
int h = 30; |
82 | 82 |
int r = 20; |
83 | 83 |
|
84 |
v0 = new Float3D( 0, r, h );
|
|
85 |
v1 = new Float3D(-r, 0, h );
|
|
86 |
v2 = new Float3D( 0,-r, h );
|
|
87 |
v3 = new Float3D( r, 0, h );
|
|
84 |
v0 = new Static3D( 0, r, h );
|
|
85 |
v1 = new Static3D(-r, 0, h );
|
|
86 |
v2 = new Static3D( 0,-r, h );
|
|
87 |
v3 = new Static3D( r, 0, h );
|
|
88 | 88 |
|
89 | 89 |
di.add(v0); |
90 | 90 |
di.add(v1); |
Also available in: Unified diff
Major push towards simplifying DistortedObject's public API.
All MATRIX effects are using the new API - the 'DataND' marker interfaces.