Project

General

Profile

« Previous | Next » 

Revision b0a56742

Added by Leszek Koltunski about 4 years ago

More support for the Helicopter.

View differences:

src/main/java/org/distorted/objects/RubikHelicopter.java
111 111
         };
112 112

  
113 113
  private static final float DIST_CORNER = 0.50f;
114
  private static final float DIST_CENTER = 0.49f;
114
  private static final float DIST_CENTER = 0.50f;
115 115
  private static final float XY_CENTER   = DIST_CORNER/3;
116 116

  
117 117
  // centers of the 8 corners + 6*4 face triangles ( i.e. of the all 32 cubits)
......
374 374
    float[] vertices2 = { -E/2,-F/3, +E/2,-F/3, 0,2*F/3};
375 375

  
376 376
    float[] bands2 = { 1.0f   , 0.0f,
377
                       0.5f   , 0.02f,
378
                       0.0f   , 0.03f };
377
                       0.5f   , 0.01f,
378
                       0.0f   , 0.01f };
379 379

  
380 380
    meshes[2] = new MeshPolygon(vertices2, bands2, 1, 3);
381 381
    meshes[2].setEffectAssociation(0,4,0);
src/main/java/org/distorted/objects/RubikMovementHelicopter.java
68 68
      {
69 69
      case 0: switch(quarter)
70 70
                {
71
                case 0: enabled[1]=1; enabled[2]=3; break;
72
                case 1: enabled[1]=0; enabled[2]=3; break;
73
                case 2: enabled[1]=0; enabled[2]=2; break;
74
                case 3: enabled[1]=1; enabled[2]=2; break;
71
                case 0: enabled[1]=2; enabled[2]=5; break;
72
                case 1: enabled[1]=2; enabled[2]=4; break;
73
                case 2: enabled[1]=3; enabled[2]=4; break;
74
                case 3: enabled[1]=3; enabled[2]=5; break;
75 75
                }
76 76
              break;
77 77
      case 1: switch(quarter)
78 78
                {
79
                case 0: enabled[1]=2; enabled[2]=3; break;
80
                case 1: enabled[1]=3; enabled[2]=1; break;
81
                case 2: enabled[1]=0; enabled[2]=1; break;
82
                case 3: enabled[1]=0; enabled[2]=2; break;
79
                case 0: enabled[1]=2; enabled[2]=4; break;
80
                case 1: enabled[1]=2; enabled[2]=5; break;
81
                case 2: enabled[1]=5; enabled[2]=3; break;
82
                case 3: enabled[1]=3; enabled[2]=4; break;
83 83
                }
84 84
              break;
85 85
      case 2: switch(quarter)
86 86
                {
87
                case 0: enabled[1]=1; enabled[2]=2; break;
88
                case 1: enabled[1]=0; enabled[2]=1; break;
89
                case 2: enabled[1]=0; enabled[2]=3; break;
90
                case 3: enabled[1]=2; enabled[2]=3; break;
87
                case 0: enabled[1]=0; enabled[2]=5; break;
88
                case 1: enabled[1]=1; enabled[2]=5; break;
89
                case 2: enabled[1]=1; enabled[2]=4; break;
90
                case 3: enabled[1]=0; enabled[2]=4; break;
91 91
                }
92 92
              break;
93 93
      case 3: switch(quarter)
94 94
                {
95
                case 0: enabled[1]=1; enabled[2]=2; break;
96
                case 1: enabled[1]=2; enabled[2]=3; break;
97
                case 2: enabled[1]=0; enabled[2]=3; break;
98
                case 3: enabled[1]=0; enabled[2]=1; break;
95
                case 0: enabled[1]=0; enabled[2]=4; break;
96
                case 1: enabled[1]=1; enabled[2]=4; break;
97
                case 2: enabled[1]=1; enabled[2]=5; break;
98
                case 3: enabled[1]=0; enabled[2]=5; break;
99 99
                }
100 100
              break;
101 101
      case 4: switch(quarter)
102 102
                {
103
                case 0: enabled[1]=0; enabled[2]=3; break;
104
                case 1: enabled[1]=0; enabled[2]=2; break;
105
                case 2: enabled[1]=1; enabled[2]=2; break;
106
                case 3: enabled[1]=1; enabled[2]=3; break;
103
                case 0: enabled[1]=1; enabled[2]=3; break;
104
                case 1: enabled[1]=0; enabled[2]=3; break;
105
                case 2: enabled[1]=0; enabled[2]=2; break;
106
                case 3: enabled[1]=1; enabled[2]=2; break;
107 107
                }
108 108
              break;
109 109
      case 5: switch(quarter)
110 110
                {
111
                case 0: enabled[1]=1; enabled[2]=2; break;
112
                case 1: enabled[1]=0; enabled[2]=2; break;
113
                case 2: enabled[1]=0; enabled[2]=3; break;
114
                case 3: enabled[1]=1; enabled[2]=3; break;
111
                case 0: enabled[1]=0; enabled[2]=3; break;
112
                case 1: enabled[1]=1; enabled[2]=3; break;
113
                case 2: enabled[1]=1; enabled[2]=2; break;
114
                case 3: enabled[1]=0; enabled[2]=2; break;
115 115
                }
116 116
              break;
117 117
      }

Also available in: Unified diff