Project

General

Profile

« Previous | Next » 

Revision 9f1f377d

Added by Leszek Koltunski about 4 years ago

Progress with object Movement.

View differences:

src/main/java/org/distorted/object/RubikObjectMovement.java
27 27

  
28 28
public abstract class RubikObjectMovement
29 29
  {
30
  float[] mTouch;
31 30
  int mRotationVect, mLastTouchedAxis;
32 31

  
33
  private float[] mPoint, mCamera, mDiff, m2Dpoint;
32
  private float[] mPoint, mCamera, mDiff, mTouch, m2Dpoint;
34 33
  private int mLastTouchedLR;
35 34
  private int mNumAxis, mNumFacesPerAxis;
36 35
  private int[] mPossible;
......
40 39
///////////////////////////////////////////////////////////////////////////////////////////////////
41 40

  
42 41
  abstract boolean isInsideFace(float[] point);
43
  abstract float fillUpRotationVectAndOffset(float[] vect, int[] possible);
42
  abstract float fillUpRotationVectAndOffset(float[] vect, float[] touch, int[] possible);
44 43
  abstract float returnAngle(float[] vect, int[] possible);
45 44
  abstract void fillPossibleRotations(int axis, int[] output);
46 45

  
......
208 207
    mDiff[1] -= mTouch[1];
209 208
    mDiff[2] -= mTouch[2];
210 209

  
211
    float offset = fillUpRotationVectAndOffset(mDiff, mPossible);
210
    float offset = fillUpRotationVectAndOffset(mDiff, mTouch, mPossible);
212 211
    return new Static2D(mRotationVect,offset);
213 212
    }
214 213

  

Also available in: Unified diff