Revision d4374cd3
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/examples/rubik/RubikRenderer.java | ||
---|---|---|
47 | 47 |
private Static4D mTempCurrent, mTempAccumulated; |
48 | 48 |
private float mCubeSizeInScreenSpace; |
49 | 49 |
private boolean mFinishRotation, mRemoveRotation, mFinishDragCurrent, mFinishDragAccumulated; |
50 |
private boolean mCanRotate; |
|
50 | 51 |
private RubikCube mCube; |
51 | 52 |
|
52 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
70 | 71 |
mFinishDragCurrent = false; |
71 | 72 |
mFinishDragAccumulated = false; |
72 | 73 |
|
74 |
mCanRotate = true; |
|
75 |
|
|
73 | 76 |
mCube = new RubikCube(NUM_CUBES, mMove, mScale, mQuatCurrent, mQuatAccumulated); |
74 | 77 |
} |
75 | 78 |
|
... | ... | |
95 | 98 |
|
96 | 99 |
if( mFinishRotation ) |
97 | 100 |
{ |
101 |
mCanRotate = false; |
|
98 | 102 |
mFinishRotation=false; |
99 | 103 |
mCube.finishRotationCalledOnNextRender(this); |
100 | 104 |
} |
... | ... | |
103 | 107 |
{ |
104 | 108 |
mRemoveRotation=false; |
105 | 109 |
mCube.removeRotationCalledOnNextRender(this); |
110 |
mCanRotate = true; |
|
106 | 111 |
} |
107 | 112 |
} |
108 | 113 |
|
... | ... | |
181 | 186 |
return mCubeSizeInScreenSpace; |
182 | 187 |
} |
183 | 188 |
|
189 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
190 |
|
|
191 |
boolean canRotate() |
|
192 |
{ |
|
193 |
return mCanRotate; |
|
194 |
} |
|
195 |
|
|
184 | 196 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
185 | 197 |
|
186 | 198 |
RubikCube getCube() |
Also available in: Unified diff
RubikCube: make the post-rotation effect 'nice'.