Project

General

Profile

Download (3.17 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeDiamond.java @ 1eafa9c6

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is proprietary software licensed under an EULA which you should have received      //
7
// along with the code. If not, check https://distorted.org/magic/License-Magic-Cube.html        //
8
///////////////////////////////////////////////////////////////////////////////////////////////////
9

    
10
package org.distorted.objectlib.shape;
11

    
12
import org.distorted.library.type.Static3D;
13
import org.distorted.library.type.Static4D;
14
import org.distorted.objectlib.main.InitAssets;
15
import org.distorted.objectlib.main.TwistyObject;
16
import org.distorted.objectlib.metadata.Metadata;
17

    
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19

    
20
public abstract class ShapeDiamond extends TwistyObject
21
{
22
  public static final Static4D DEFAULT_ROT = new Static4D(-0.09848663f, 0.6306283f, 0.67572856f, 0.36878252f);
23

    
24
  public static final int COLOR_BALL_1 = 0xffcc0000;
25
  public static final int COLOR_BALL_2 = 0xffcb2d6a;
26
  public static final int COLOR_BALL_3 = 0xff4ec9d0;
27
  public static final int COLOR_BALL_4 = 0xff4678ab;
28
  public static final int COLOR_BALL_5 = 0xff057350;
29
  public static final int COLOR_BALL_6 = 0xff48ad62;
30
  public static final int COLOR_BALL_7 = 0xffedca54;
31
  public static final int COLOR_BALL_8 = 0xfffe5740;
32

    
33
  public static final int[] FACE_COLORS = new int[]
34
         {
35
           COLOR_BALL_1, COLOR_BALL_1,
36
           COLOR_BALL_2, COLOR_BALL_2,
37
           COLOR_BALL_3, COLOR_BALL_3,
38
           COLOR_BALL_4, COLOR_BALL_4,
39
           COLOR_BALL_5, COLOR_BALL_5,
40
           COLOR_BALL_6, COLOR_BALL_6,
41
           COLOR_BALL_7, COLOR_BALL_7,
42
           COLOR_BALL_8, COLOR_BALL_8,
43
         };
44

    
45
  public static final int NUM_FACES = 16;
46
  public static final int FOV = 40;
47
  public static final float RATIO = 0.75f;
48

    
49
///////////////////////////////////////////////////////////////////////////////////////////////////
50

    
51
  public ShapeDiamond(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
52
    {
53
    super(iconMode, realSize, quat, move, scale, meta, asset);
54
    }
55

    
56
///////////////////////////////////////////////////////////////////////////////////////////////////
57

    
58
  public final int getNumPuzzleFaces()
59
    {
60
    return NUM_FACES;
61
    }
62

    
63
///////////////////////////////////////////////////////////////////////////////////////////////////
64

    
65
  public int[] getColorTable()
66
    {
67
    return FACE_COLORS;
68
    }
69

    
70
///////////////////////////////////////////////////////////////////////////////////////////////////
71

    
72
  public int getFOV()
73
    {
74
    return FOV;
75
    }
76

    
77
///////////////////////////////////////////////////////////////////////////////////////////////////
78

    
79
  public float getScreenRatio()
80
    {
81
    return RATIO;
82
    }
83
}
(1-1/6)