Revision d844220f
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/objectlib/main/Cubit.java | ||
---|---|---|
40 | 40 |
private final int[] mRotationRow; |
41 | 41 |
private final int mCubitType; |
42 | 42 |
private final float[] mRowOffset; |
43 |
private final float[] mVertex;
|
|
43 |
private final float[] mTrackingPoint;
|
|
44 | 44 |
private final int mOrigPuzzleFace; |
45 | 45 |
|
46 | 46 |
private int mCurrentPuzzleFace; |
... | ... | |
56 | 56 |
mParent = parent; |
57 | 57 |
mLen = position.length; |
58 | 58 |
|
59 |
mCubitType = mParent.getCubitRotationType(cubitIndex); |
|
60 |
mRowOffset = mParent.getCubitRowOffset(cubitIndex); |
|
61 |
mVertex = mParent.getCharacteristicVertex(cubitIndex,mCubitType);
|
|
62 |
int face = mParent.computeCurrentPuzzleFace(mCubitType,mVertex);
|
|
59 |
mCubitType = mParent.getCubitRotationType(cubitIndex);
|
|
60 |
mRowOffset = mParent.getCubitRowOffset(cubitIndex);
|
|
61 |
mTrackingPoint= mParent.getTrackingPoint(cubitIndex,mCubitType);
|
|
62 |
int face = mParent.computeCurrentPuzzleFace(mCubitType,mTrackingPoint);
|
|
63 | 63 |
|
64 | 64 |
if( mCubitType==TYPE_DECIDER ) mParent.setRotationRowOffset(face,mRowOffset); |
65 | 65 |
|
... | ... | |
203 | 203 |
|
204 | 204 |
if( mCubitType!=TYPE_NORMAL ) |
205 | 205 |
{ |
206 |
QuatHelper.rotateVectorByQuat( mTmp, mVertex[0], mVertex[1], mVertex[2], 0, quat);
|
|
207 |
mVertex[0] = mTmp[0];
|
|
208 |
mVertex[1] = mTmp[1];
|
|
209 |
mVertex[2] = mTmp[2];
|
|
210 |
mCurrentPuzzleFace = mParent.computeCurrentPuzzleFace(mCubitType,mVertex);
|
|
206 |
QuatHelper.rotateVectorByQuat( mTmp, mTrackingPoint[0], mTrackingPoint[1], mTrackingPoint[2], 0, quat);
|
|
207 |
mTrackingPoint[0] = mTmp[0];
|
|
208 |
mTrackingPoint[1] = mTmp[1];
|
|
209 |
mTrackingPoint[2] = mTmp[2];
|
|
210 |
mCurrentPuzzleFace = mParent.computeCurrentPuzzleFace(mCubitType,mTrackingPoint);
|
|
211 | 211 |
} |
212 | 212 |
|
213 | 213 |
if( mCubitType==TYPE_DECIDER ) |
Also available in: Unified diff
Crazy Planets: minor