Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / shape / ShapeIcosahedron.java @ 33ba467a

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 b7ae2292 leszek
import static org.distorted.objectlib.shape.ShapeColors.*;
19
20 99320a69 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
21
22
public abstract class ShapeIcosahedron extends TwistyObject
23
{
24 0c876388 Leszek Koltunski
  public static final Static4D DEFAULT_ROT = new Static4D(0.44624275f, -0.38811404f, 0.12537706f, 0.79656535f);
25 99320a69 Leszek Koltunski
26 f9337e48 Leszek Koltunski
  public static final int[] FACE_COLORS = new int[]
27 99320a69 Leszek Koltunski
         {
28 33ba467a leszek
                 COLOR_LPINK, COLOR_VIOLET, COLOR_PURPLE, COLOR_BURGUN, COLOR_DPINK,
29
                 COLOR_YELLOW, COLOR_LGREEN, COLOR_BLUE, COLOR_GREY, COLOR_ORANGE,
30
                 COLOR_DGREEN, COLOR_SELEDY, COLOR_GREEN, COLOR_BLUEISH, COLOR_SANDY,
31
                 COLOR_DBLUE, COLOR_RED, COLOR_DYELLO, COLOR_WHITE, COLOR_LBLUE,
32 99320a69 Leszek Koltunski
         };
33
34 f9337e48 Leszek Koltunski
  public static final int NUM_FACES = 20;
35 b31249d6 Leszek Koltunski
  public static final int FOV = 30;
36 593cd919 Leszek Koltunski
  public static final float RATIO = 0.52f;
37 99320a69 Leszek Koltunski
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39
40 ae9d9227 leszek
  public ShapeIcosahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
41 99320a69 Leszek Koltunski
    {
42 ae9d9227 leszek
    super(iconMode, realSize, quat, move, scale, meta, asset);
43 99320a69 Leszek Koltunski
    }
44
45
///////////////////////////////////////////////////////////////////////////////////////////////////
46
47 1eafa9c6 leszek
  public final int getNumPuzzleFaces()
48 99320a69 Leszek Koltunski
    {
49
    return NUM_FACES;
50
    }
51
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53
54 962b8ff6 leszek
  public int[] getColorTable()
55 99320a69 Leszek Koltunski
    {
56 962b8ff6 leszek
    return FACE_COLORS;
57 99320a69 Leszek Koltunski
    }
58
59
///////////////////////////////////////////////////////////////////////////////////////////////////
60
61
  public int getFOV()
62
    {
63
    return FOV;
64
    }
65
66
///////////////////////////////////////////////////////////////////////////////////////////////////
67
68
  public float getScreenRatio()
69
    {
70
    return RATIO;
71
    }
72
}