Project

General

Profile

« Previous | Next » 

Revision ede1b68c

Added by Leszek Koltunski over 3 years ago

Progress with Megaminx.

View differences:

src/main/java/org/distorted/objects/MovementMinx.java
26 26
import static org.distorted.objects.FactoryCubit.SIN54;
27 27
import static org.distorted.objects.FactoryCubit.COS54;
28 28
import static org.distorted.objects.TwistyObject.SQ5;
29
import static org.distorted.objects.FactoryCubit.COS18;
30
import static org.distorted.objects.TwistyMegaminx.MEGA_D;
29 31

  
30 32
///////////////////////////////////////////////////////////////////////////////////////////////////
31 33

  
......
54 56

  
55 57
  MovementMinx()
56 58
    {
57
    super(TwistyKilominx.ROT_AXIS, FACE_AXIS, DIST3D, DIST2D);
59
    super(TwistyMinx.ROT_AXIS, FACE_AXIS, DIST3D, DIST2D);
58 60
    }
59 61

  
60 62
///////////////////////////////////////////////////////////////////////////////////////////////////
61 63

  
62 64
  int computeRowFromOffset(int face, int size, float offset)
63 65
    {
64
    return offset<DIST2D ? 0:2;
66
    if( size==3 )
67
      {
68
      return offset<DIST2D ? 0:2;
69
      }
70
    if( size==5 )
71
      {
72
      // TODO
73

  
74
      float LEN = (0.5f-MEGA_D)*COS18/3;
75

  
76
      android.util.Log.e("mega", "offset = "+offset+" len="+LEN+" dist2D="+DIST2D);
77

  
78
      if( offset<LEN/2 ) return 0;
79
      if( offset<LEN   ) return 1;
80
      }
81

  
82
    return 0;
65 83
    }
66 84

  
67 85
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff