Project

General

Profile

« Previous | Next » 

Revision 50172827

Added by Leszek Koltunski over 3 years ago

Minor

View differences:

src/main/java/org/distorted/objectlib/helpers/QuatGroupGenerator.java
251 251

  
252 252
    android.util.Log.e("D", dbg);
253 253
    }
254

  
255
///////////////////////////////////////////////////////////////////////////////////////////////////
256

  
257
  public static void computeMap(Static4D[] newGroup, Static4D[] oldGroup)
258
    {
259
    int newLen = newGroup.length;
260
    int oldLen = oldGroup.length;
261

  
262
    if( newLen!=oldLen )
263
      {
264
      android.util.Log.e("D", "ERROR! oldLen="+oldLen+" newLen="+newLen);
265
      return;
266
      }
267

  
268
    for( int i=0; i<oldLen; i++ )
269
      {
270
      Static4D oldQuat = oldGroup[i];
271
      int found = -1;
272

  
273
      for( int j=0; j<newLen; j++ )
274
        {
275
        Static4D newQuat = newGroup[j];
276

  
277
        if( quatTheSame(oldQuat,newQuat) )
278
          {
279
          found = j;
280
          break;
281
          }
282
        }
283

  
284
      if( found>=0 ) android.util.Log.d("D", "old quat="+i+" ---> "+found);
285
      else           android.util.Log.e("D", "old quat="+i+" ---> "+found);
286
      }
287
    }
288 254
  }
src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java
42 42
  private static final float CUT = 0.2f;
43 43
  private static final float LEN = 1.5f;
44 44

  
45
  // the three rotation axis of a 3x3x3 cube. Must be normalized.
46 45
  static final Static3D[] ROT_AXIS = new Static3D[]
47 46
         {
48 47
         new Static3D(SQ2/2, 0, SQ2/2),

Also available in: Unified diff