Project

General

Profile

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

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

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
import static org.distorted.objectlib.shape.ShapeColors.*;
19

    
20
///////////////////////////////////////////////////////////////////////////////////////////////////
21

    
22
public abstract class ShapeIcosahedron extends TwistyObject
23
{
24
  public static final Static4D DEFAULT_ROT = new Static4D(0.44624275f, -0.38811404f, 0.12537706f, 0.79656535f);
25

    
26
  public static final int[] FACE_COLORS = new int[]
27
         {
28
                 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
         };
33

    
34
  public static final int NUM_FACES = 20;
35
  public static final int FOV = 30;
36
  public static final float RATIO = 0.52f;
37

    
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39

    
40
  public ShapeIcosahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
41
    {
42
    super(iconMode, realSize, quat, move, scale, meta, asset);
43
    }
44

    
45
///////////////////////////////////////////////////////////////////////////////////////////////////
46

    
47
  public final int getNumPuzzleFaces()
48
    {
49
    return NUM_FACES;
50
    }
51

    
52
///////////////////////////////////////////////////////////////////////////////////////////////////
53

    
54
  public int[] getColorTable()
55
    {
56
    return FACE_COLORS;
57
    }
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
}
(5-5/7)