Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeIcosahedron.java @ 716f5517

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.InitData;
16
import org.distorted.objectlib.main.TwistyObject;
17 99320a69 Leszek Koltunski
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20
public abstract class ShapeIcosahedron extends TwistyObject
21
{
22
  public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
23
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 716f5517 Leszek Koltunski
  public static final float RATIO = 0.25f;
56 99320a69 Leszek Koltunski
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58
59 cf93ea4e Leszek Koltunski
  public ShapeIcosahedron(int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InitData data, InitAssets asset)
60 99320a69 Leszek Koltunski
    {
61 cf93ea4e Leszek Koltunski
    super(meshState, iconMode, realSize, quat, move, scale, data, asset);
62 99320a69 Leszek Koltunski
    }
63
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65
66
  public final int getNumFaces()
67
    {
68
    return NUM_FACES;
69
    }
70
71
///////////////////////////////////////////////////////////////////////////////////////////////////
72
73
  public int getNumFaceColors()
74
    {
75
    return FACE_COLORS.length;
76
    }
77
78
///////////////////////////////////////////////////////////////////////////////////////////////////
79
80
  public int getColor(int face)
81
    {
82
    return FACE_COLORS[face];
83
    }
84
85
///////////////////////////////////////////////////////////////////////////////////////////////////
86
87
  public int getFOV()
88
    {
89
    return FOV;
90
    }
91
92
///////////////////////////////////////////////////////////////////////////////////////////////////
93
94
  public float getScreenRatio()
95
    {
96
    return RATIO;
97
    }
98
}