Project

General

Profile

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

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

1
///////////////////////////////////////////////////////////////////////////////////////////////////
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
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 ShapeIcosahedron extends TwistyObject
21
{
22
  public static final Static4D DEFAULT_ROT = new Static4D(0.44624275f, -0.38811404f, 0.12537706f, 0.79656535f);
23

    
24
  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

    
45
  public static final int[] FACE_COLORS = new int[]
46
         {
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
  public static final int NUM_FACES = 20;
54
  public static final int FOV = 30;
55
  public static final float RATIO = 0.52f;
56

    
57
///////////////////////////////////////////////////////////////////////////////////////////////////
58

    
59
  public ShapeIcosahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
60
    {
61
    super(iconMode, realSize, quat, move, scale, meta, asset);
62
    }
63

    
64
///////////////////////////////////////////////////////////////////////////////////////////////////
65

    
66
  public final int getNumPuzzleFaces()
67
    {
68
    return NUM_FACES;
69
    }
70

    
71
///////////////////////////////////////////////////////////////////////////////////////////////////
72

    
73
  public int[] getColorTable()
74
    {
75
    return FACE_COLORS;
76
    }
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
}
(4-4/6)