Revision bcdecc9f
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
280 | 280 |
|
281 | 281 |
private void beginRotation(float x, float y) |
282 | 282 |
{ |
283 |
mStartRotX = x; |
|
284 |
mStartRotY = y; |
|
285 |
|
|
286 | 283 |
TwistyObject object = mPreRender.getObject(); |
287 | 284 |
int[] numLayers = object.getNumLayers(); |
288 | 285 |
|
... | ... | |
290 | 287 |
Static4D rotatedTouchPoint= QuatHelper.rotateVectorByInvertedQuat(touchPoint, mQuat); |
291 | 288 |
mTouchControl.newRotation(mBuffer,rotatedTouchPoint,mQuat); |
292 | 289 |
|
293 |
mCurrentAxis = mBuffer[0]; |
|
294 |
mCurrentRow = mBuffer[1]; |
|
295 |
|
|
296 |
mTouchControl.getCastedRotAxis(mAxis,mQuat,mCurrentAxis); |
|
297 |
mRotationFactor = mTouchControl.returnRotationFactor(numLayers,mCurrentRow); |
|
290 |
int currentAxis = mBuffer[0]; |
|
291 |
int currentRow = mBuffer[1]; |
|
298 | 292 |
|
299 |
object.beginNewRotation( mCurrentAxis, mCurrentRow ); |
|
293 |
mTouchControl.getCastedRotAxis(mAxis,mQuat,currentAxis); |
|
294 |
mRotationFactor = mTouchControl.returnRotationFactor(numLayers,currentRow); |
|
300 | 295 |
|
301 |
mInterface.onBeginRotation(); |
|
296 |
if( object.beginNewRotation( currentAxis, currentRow ) ) |
|
297 |
{ |
|
298 |
mInterface.onBeginRotation(); |
|
302 | 299 |
|
303 |
addSpeedProbe(x,y); |
|
300 |
addSpeedProbe(x,y);
|
|
304 | 301 |
|
305 |
mBeginningRotation = false; |
|
306 |
mContinuingRotation= true; |
|
302 |
mBeginningRotation = false; |
|
303 |
mContinuingRotation= true; |
|
304 |
mStartRotX = x; |
|
305 |
mStartRotY = y; |
|
306 |
mCurrentAxis = currentAxis; |
|
307 |
mCurrentRow = currentRow; |
|
308 |
} |
|
307 | 309 |
} |
308 | 310 |
|
309 | 311 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Make it impossible to addNewRotation() (i.e. the automatic rotations triggered from backMove, scrambleEffect etc) or beginNewRotation() (by swiping a finger) when we are currently finishing a previous rotation and haven't removed it yet.