Project

General

Profile

« Previous | Next » 

Revision 66cbdd21

Added by Leszek Koltunski about 4 years ago

Some fixes for the Pyraminx.

View differences:

src/main/java/org/distorted/object/Cubit.java
53 53
  DistortedNode mNode;
54 54
  DistortedEffects mEffect;
55 55
  Static4D mQuatScramble;
56
  int[] mRotationRow;
56
  float[] mRotationRow;
57 57

  
58 58
///////////////////////////////////////////////////////////////////////////////////////////////////
59 59
// Because of quatMultiplication, errors can accumulate - so to avoid this, we
......
169 169
      {
170 170
      axis = mParent.ROTATION_AXIS[i];
171 171
      tmp = x*axis.get0() + y*axis.get1() + z*axis.get2();
172
      mRotationRow[i] = (int)( (tmp-mParent.mStart)/mParent.mStep + 0.5f );
172
      mRotationRow[i] = (tmp-mParent.mStart)/mParent.mStep;
173 173
      }
174 174
    }
175 175

  
......
193 193
    mRotateEffect    = new MatrixEffectRotate(mRotationAngle, mRotationAxis, matrCenter);
194 194

  
195 195
    mNumAxis     = mParent.ROTATION_AXIS.length;
196
    mRotationRow = new int[mNumAxis];
196
    mRotationRow = new float[mNumAxis];
197 197
    computeRotationRow();
198 198

  
199 199
    mEffect = new DistortedEffects();

Also available in: Unified diff