Project

General

Profile

« Previous | Next » 

Revision efa81f0c

Added by Leszek Koltunski over 2 years ago

Introduce abstract 4,6,8 adn 12 classes.

View differences:

src/main/java/org/distorted/objects/TwistyBandagedAbstract.java
32 32

  
33 33
///////////////////////////////////////////////////////////////////////////////////////////////////
34 34

  
35
abstract class TwistyBandagedAbstract extends TwistyObject
35
abstract class TwistyBandagedAbstract extends Twisty6
36 36
{
37 37
  // the three rotation axis of a 3x3 Cube. Must be normalized.
38 38
  static final Static3D[] ROT_AXIS = new Static3D[]
......
42 42
           new Static3D(0,0,1)
43 43
         };
44 44

  
45
  private static final int[] FACE_COLORS = new int[]
46
         {
47
           COLOR_YELLOW, COLOR_WHITE,
48
           COLOR_BLUE  , COLOR_GREEN,
49
           COLOR_RED   , COLOR_ORANGE
50
         };
51

  
52 45
  private static final int[][] mDimensions = new int[][]
53 46
        {
54 47
         {1,1,1},  // has to be X>=Z>=Y so that all
......
258 251
    return 1;
259 252
    }
260 253

  
261
///////////////////////////////////////////////////////////////////////////////////////////////////
262

  
263
  int getColor(int face)
264
    {
265
    return FACE_COLORS[face];
266
    }
267

  
268 254
///////////////////////////////////////////////////////////////////////////////////////////////////
269 255

  
270 256
  ObjectSticker retSticker(int face)
......
323 309
    return mQuats;
324 310
    }
325 311

  
326
///////////////////////////////////////////////////////////////////////////////////////////////////
327

  
328
  boolean shouldResetTextureMaps()
329
    {
330
    return false;
331
    }
332

  
333
///////////////////////////////////////////////////////////////////////////////////////////////////
334

  
335
  int getNumFaceColors()
336
    {
337
    return FACE_COLORS.length;
338
    }
339

  
340 312
///////////////////////////////////////////////////////////////////////////////////////////////////
341 313

  
342 314
  float[][] getCuts(int numLayers)
......
372 344

  
373 345
  int getNumCubitFaces()
374 346
    {
375
    return FACE_COLORS.length;
376
    }
377

  
378
///////////////////////////////////////////////////////////////////////////////////////////////////
379

  
380
  float getScreenRatio()
381
    {
382
    return 0.5f;
347
    return 6;
383 348
    }
384 349

  
385 350
///////////////////////////////////////////////////////////////////////////////////////////////////
......
454 419
    return reaches ? stickerIndex*NUM_FACE_COLORS + face : NUM_TEXTURES;
455 420
    }
456 421

  
457
///////////////////////////////////////////////////////////////////////////////////////////////////
458

  
459
  float returnMultiplier()
460
    {
461
    return getNumLayers();
462
    }
463

  
464 422
///////////////////////////////////////////////////////////////////////////////////////////////////
465 423
// PUBLIC API
466 424

  

Also available in: Unified diff