Project

General

Profile

« Previous | Next » 

Revision 82e62580

Added by Leszek Koltunski about 2 years ago

Progress with cubit quaternions.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
34 34
public class TwistySquare2 extends TwistySquare
35 35
{
36 36
  private ScrambleState[] mStates;
37
  private int[] mQuatNumber;
37
  private int[] mQuatIndex;
38 38
  private float[][] mCenters;
39 39

  
40 40
///////////////////////////////////////////////////////////////////////////////////////////////////
......
131 131

  
132 132
  public Static4D getCubitQuats(int cubit, int[] numLayers)
133 133
    {
134
    if( mQuatNumber ==null )
134
    if( mQuatIndex==null )
135 135
      {
136
      mQuatNumber = new int[]
136
      mQuatIndex = new int[]
137 137
        {
138 138
        0, 6,
139
        0, 9, 6, 3, 17, 14, 23, 20,
140
        0, 9, 6, 3, 0, 9, 6, 3,
141
        14, 23, 20, 17, 14, 23, 20, 17
139
        0, 9, 6, 3,17,14,23,20,
140
        0, 9, 6, 3, 0, 9, 6, 3,14, 23, 20, 17, 14, 23, 20, 17
142 141
        };
143 142
      }
144 143

  
145
    return mObjectQuats[mQuatNumber[cubit]];
144
    return mObjectQuats[mQuatIndex[cubit]];
146 145
    }
147 146

  
148 147
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff