Project

General

Profile

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

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

1 99320a69 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2022 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 b31249d6 Leszek Koltunski
package org.distorted.objectlib.shape;
11 99320a69 Leszek Koltunski
12
import org.distorted.library.type.Static3D;
13
import org.distorted.library.type.Static4D;
14 cf93ea4e Leszek Koltunski
import org.distorted.objectlib.main.InitAssets;
15 b31249d6 Leszek Koltunski
import org.distorted.objectlib.main.TwistyObject;
16 ae9d9227 leszek
import org.distorted.objectlib.metadata.Metadata;
17 99320a69 Leszek Koltunski
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20
public abstract class ShapeIcosahedron extends TwistyObject
21
{
22 0c876388 Leszek Koltunski
  public static final Static4D DEFAULT_ROT = new Static4D(0.44624275f, -0.38811404f, 0.12537706f, 0.79656535f);
23 99320a69 Leszek Koltunski
24 54588439 Leszek Koltunski
  static final int ICO_1 = 0xffe191b4;
25
  static final int ICO_2 = 0xff604c94;
26
  static final int ICO_3 = 0xff472258;
27
  static final int ICO_4 = 0xff591218;
28
  static final int ICO_5 = 0xffba365b;
29
  static final int ICO_6 = 0xffe4d031;
30
  static final int ICO_7 = 0xff4a90d5;
31
  static final int ICO_8 = 0xff0e28a3;
32
  static final int ICO_9 = 0xff566069;
33
  static final int ICO_10= 0xffd7660a;
34
  static final int ICO_11= 0xff092d2b;
35
  static final int ICO_12= 0xff034d3e;
36
  static final int ICO_13= 0xff1a7516;
37
  static final int ICO_14= 0xff58b6be;
38
  static final int ICO_15= 0xffd3c49b;
39
  static final int ICO_16= 0xff0a1662;
40
  static final int ICO_17= 0xffa21a1c;
41
  static final int ICO_18= 0xffe1b410;
42
  static final int ICO_19= 0xffdadeea;
43
  static final int ICO_20= 0xff0157ba;
44 99320a69 Leszek Koltunski
45 f9337e48 Leszek Koltunski
  public static final int[] FACE_COLORS = new int[]
46 99320a69 Leszek Koltunski
         {
47
           ICO_1 , ICO_2 , ICO_3 , ICO_4 , ICO_5 ,
48
           ICO_6 , ICO_7 , ICO_8 , ICO_9 , ICO_10,
49
           ICO_11, ICO_12, ICO_13, ICO_14, ICO_15,
50
           ICO_16, ICO_17, ICO_18, ICO_19, ICO_20,
51
         };
52
53 f9337e48 Leszek Koltunski
  public static final int NUM_FACES = 20;
54 b31249d6 Leszek Koltunski
  public static final int FOV = 30;
55 593cd919 Leszek Koltunski
  public static final float RATIO = 0.52f;
56 99320a69 Leszek Koltunski
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58
59 ae9d9227 leszek
  public ShapeIcosahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
60 99320a69 Leszek Koltunski
    {
61 ae9d9227 leszek
    super(iconMode, realSize, quat, move, scale, meta, asset);
62 99320a69 Leszek Koltunski
    }
63
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65
66 1eafa9c6 leszek
  public final int getNumPuzzleFaces()
67 99320a69 Leszek Koltunski
    {
68
    return NUM_FACES;
69
    }
70
71
///////////////////////////////////////////////////////////////////////////////////////////////////
72
73 962b8ff6 leszek
  public int[] getColorTable()
74 99320a69 Leszek Koltunski
    {
75 962b8ff6 leszek
    return FACE_COLORS;
76 99320a69 Leszek Koltunski
    }
77
78
///////////////////////////////////////////////////////////////////////////////////////////////////
79
80
  public int getFOV()
81
    {
82
    return FOV;
83
    }
84
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86
87
  public float getScreenRatio()
88
    {
89
    return RATIO;
90
    }
91
}