Project

General

Profile

« Previous | Next » 

Revision c9c71c3f

Added by Leszek Koltunski over 2 years ago

Abstract out the TouchControl stuff in preparation for its new type - TouchControlShapeChanging.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyMinx.java
19 19

  
20 20
package org.distorted.objectlib.objects;
21 21

  
22
import static org.distorted.objectlib.movement.Movement.MOVEMENT_DODECAHEDRON;
23
import static org.distorted.objectlib.movement.Movement.TYPE_SPLIT_EDGE;
24
import static org.distorted.objectlib.movement.MovementDodecahedron.C2;
25
import static org.distorted.objectlib.movement.MovementDodecahedron.LEN;
26
import static org.distorted.objectlib.movement.MovementDodecahedron.SIN54;
22
import static org.distorted.objectlib.touchcontrol.TouchControl.TC_DODECAHEDRON;
23
import static org.distorted.objectlib.touchcontrol.TouchControl.TYPE_SPLIT_EDGE;
24
import static org.distorted.objectlib.touchcontrol.TouchControlDodecahedron.C2;
25
import static org.distorted.objectlib.touchcontrol.TouchControlDodecahedron.LEN;
26
import static org.distorted.objectlib.touchcontrol.TouchControlDodecahedron.SIN54;
27 27

  
28 28
import java.io.InputStream;
29 29

  
30 30
import org.distorted.library.type.Static3D;
31 31
import org.distorted.library.type.Static4D;
32
import org.distorted.objectlib.movement.MovementDodecahedron;
32
import org.distorted.objectlib.touchcontrol.TouchControlDodecahedron;
33 33
import org.distorted.objectlib.helpers.ObjectSticker;
34 34
import org.distorted.objectlib.helpers.ScrambleState;
35 35
import org.distorted.objectlib.main.ShapeDodecahedron;
......
494 494
    if( mQuats==null ) initializeQuats();
495 495
    if( mFaceMap==null ) mFaceMap = new int[] {8,10,3,7,1,9,11,2,4,0,5,6};
496 496
    int status = retCubitSolvedStatus(cubit,numLayers);
497
    return status<0 ? null : buildSolvedQuats(MovementDodecahedron.FACE_AXIS[mFaceMap[status]],mQuats);
497
    return status<0 ? null : buildSolvedQuats(TouchControlDodecahedron.FACE_AXIS[mFaceMap[status]],mQuats);
498 498
    }
499 499

  
500 500
///////////////////////////////////////////////////////////////////////////////////////////////////
......
512 512
    if( mCuts==null )
513 513
      {
514 514
      mCuts = new float[6][numLayers-1];
515
      float D = numLayers* MovementDodecahedron.DIST3D;
515
      float D = numLayers* TouchControlDodecahedron.DIST3D;
516 516
      float X = 2*D/(2+SIN18);  // height of the 'upper' part of a dodecahedron, i.e. put it on a table,
517 517
                                // its height is then 2D, it has one 'lower' part of height X, one
518 518
                                // 'middle' part of height Y and one upper part of height X again.
......
563 563

  
564 564
  public int getMovementType()
565 565
    {
566
    return MOVEMENT_DODECAHEDRON;
566
    return TC_DODECAHEDRON;
567 567
    }
568 568

  
569 569
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff