22 |
22 |
import android.graphics.Bitmap;
|
23 |
23 |
import android.graphics.BitmapFactory;
|
24 |
24 |
|
|
25 |
import org.distorted.library.effect.MatrixEffectMove;
|
25 |
26 |
import org.distorted.library.effect.MatrixEffectScale;
|
26 |
27 |
import org.distorted.library.main.DistortedEffects;
|
27 |
28 |
import org.distorted.library.main.DistortedNode;
|
... | ... | |
49 |
50 |
private long mEffectID;
|
50 |
51 |
|
51 |
52 |
private Dynamic3D mDynamic;
|
52 |
|
private MatrixEffectScale mScale;
|
|
53 |
private MatrixEffectMove mMove;
|
53 |
54 |
|
54 |
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
55 |
56 |
|
... | ... | |
77 |
78 |
mEffects[0]= new DistortedEffects();
|
78 |
79 |
mEffects[1]= new DistortedEffects();
|
79 |
80 |
|
80 |
|
float scaleCirc = 150;
|
81 |
|
float scaleHand = 300;
|
|
81 |
float x1 = 200;
|
|
82 |
float y1 = 300;
|
|
83 |
float z = 0;
|
82 |
84 |
|
83 |
|
Static3D scale0 = new Static3D(scaleCirc,scaleCirc,scaleCirc);
|
84 |
|
Static3D scale1 = new Static3D(scaleHand,scaleHand,scaleHand);
|
|
85 |
Static3D point0 = new Static3D(-x1,-y1,z);
|
|
86 |
Static3D point1 = new Static3D(+x1,-y1,z);
|
|
87 |
Static3D point2 = new Static3D(+x1,+y1,z);
|
85 |
88 |
|
86 |
89 |
mDynamic = new Dynamic3D(10000,0.5f);
|
87 |
|
mDynamic.add(scale0);
|
|
90 |
mDynamic.add(point0);
|
|
91 |
mDynamic.add(point1);
|
|
92 |
mDynamic.add(point2);
|
88 |
93 |
mDynamic.setMode(Dynamic.MODE_PATH);
|
89 |
94 |
|
90 |
|
mScale = new MatrixEffectScale(mDynamic);
|
91 |
|
mScale.notifyWhenFinished(mControl);
|
92 |
|
mEffectID = mScale.getID();
|
93 |
|
mEffects[0].apply(mScale);
|
94 |
|
mEffects[1].apply( new MatrixEffectScale(scale1));
|
|
95 |
mMove = new MatrixEffectMove(mDynamic);
|
|
96 |
mMove.notifyWhenFinished(mControl);
|
|
97 |
mEffectID = mMove.getID();
|
|
98 |
|
|
99 |
mEffects[0].apply( new MatrixEffectScale(150));
|
|
100 |
mEffects[0].apply(mMove);
|
|
101 |
mEffects[1].apply( new MatrixEffectScale(300));
|
|
102 |
mEffects[1].apply(mMove);
|
95 |
103 |
}
|
96 |
104 |
else
|
97 |
105 |
{
|
98 |
106 |
mDynamic.resetToBeginning();
|
99 |
|
mScale.notifyWhenFinished(mControl);
|
|
107 |
mMove.notifyWhenFinished(mControl);
|
100 |
108 |
}
|
101 |
109 |
}
|
102 |
110 |
|
Progress with RubikControl.