Revision ab004c6d
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/examples/dynamic/DynamicSurfaceView.java | ||
---|---|---|
62 | 62 |
static final int NUM_POINTS = 250; |
63 | 63 |
private static final Object lock = new Object(); |
64 | 64 |
|
65 |
private WeakReference<DynamicActivity> mAct; |
|
65 |
private final WeakReference<DynamicActivity> mAct;
|
|
66 | 66 |
|
67 | 67 |
private static int halfScreenHeight=0; |
68 | 68 |
private static int halfScreenWidth =0; |
69 | 69 |
|
70 |
private Dynamic1D di1D; |
|
71 |
private Dynamic2D di2D; |
|
72 |
private Dynamic3D di3D; |
|
73 |
private Dynamic4D di4D; |
|
74 |
private DynamicQuat diQu; |
|
70 |
private final Dynamic1D di1D;
|
|
71 |
private final Dynamic2D di2D;
|
|
72 |
private final Dynamic3D di3D;
|
|
73 |
private final Dynamic4D di4D;
|
|
74 |
private final DynamicQuat diQu;
|
|
75 | 75 |
|
76 |
private Paint mPaint; |
|
76 |
private final Paint mPaint;
|
|
77 | 77 |
private int mMoving; |
78 | 78 |
private int mDuration; |
79 | 79 |
private int mPosition; |
80 | 80 |
private long mDiffTime, mLastTime, mStartTime; |
81 |
private float[] mNoise = new float[MAX_DIM]; |
|
81 |
private final float[] mNoise = new float[MAX_DIM];
|
|
82 | 82 |
private float mCount; |
83 | 83 |
|
84 | 84 |
private int mSize1, mSize2, mSizeT, mAvg; |
... | ... | |
92 | 92 |
private Static4D p4D; |
93 | 93 |
private Static4D pQD; |
94 | 94 |
|
95 |
private Static1D p1N; |
|
96 |
private Static2D p2N; |
|
97 |
private Static3D p3N; |
|
98 |
private Static4D p4N; |
|
99 |
private Static4D pQN; |
|
95 |
private final Static1D p1N;
|
|
96 |
private final Static2D p2N;
|
|
97 |
private final Static3D p3N;
|
|
98 |
private final Static4D p4N;
|
|
99 |
private final Static4D pQN;
|
|
100 | 100 |
|
101 |
private float[] mPoints = new float[MAX_DIM*NUM_POINTS]; |
|
101 |
private final float[] mPoints = new float[MAX_DIM*NUM_POINTS];
|
|
102 | 102 |
private boolean mRunning; |
103 | 103 |
|
104 | 104 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
451 | 451 |
} |
452 | 452 |
else |
453 | 453 |
{ |
454 |
float x,y,min = QUAT_QUOT* (halfScreenWidth<halfScreenHeight ? halfScreenWidth:halfScreenHeight );
|
|
454 |
float x,y,min = QUAT_QUOT* (Math.min(halfScreenWidth, halfScreenHeight));
|
|
455 | 455 |
|
456 | 456 |
for(int i=0; i<NUM_POINTS; i++) |
457 | 457 |
{ |
Also available in: Unified diff
RubikControl: fixes; progress.