Project

General

Profile

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

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

1
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 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 ShapeDodecahedron extends TwistyObject
21
{
22
  public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
23

    
24
  static final int MINX_LGREEN = 0xff53aa00;
25
  static final int MINX_PINK   = 0xfffd7ab7;
26
  static final int MINX_SANDY  = 0xffefd48b;
27
  static final int MINX_LBLUE  = 0xff00a2d7;
28
  static final int MINX_ORANGE = 0xffff6200;
29
  static final int MINX_VIOLET = 0xff7d59a4;
30
  static final int MINX_DGREEN = 0xff007a47;
31
  static final int MINX_DRED   = 0xffbd0000;
32
  static final int MINX_DBLUE  = 0xff1a29b2;
33
  static final int MINX_DYELLOW= 0xffffc400;
34
  static final int MINX_WHITE  = 0xffffffff;
35
  static final int MINX_GREY   = 0xff727c7b;
36

    
37
  public static final int[] FACE_COLORS = new int[]
38
         {
39
           MINX_DYELLOW, MINX_ORANGE , MINX_DRED  , MINX_SANDY,
40
           MINX_DBLUE  , MINX_WHITE  , MINX_GREY  , MINX_LBLUE,
41
           MINX_LGREEN , MINX_VIOLET , MINX_PINK  , MINX_DGREEN
42
         };
43

    
44
  public static final int NUM_FACES = 12;
45
  public static final int FOV = 30;
46
  public static final float RATIO = 0.35f;
47

    
48
///////////////////////////////////////////////////////////////////////////////////////////////////
49

    
50
  public ShapeDodecahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
51
    {
52
    super(iconMode, realSize, quat, move, scale, meta, asset);
53
    }
54

    
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56

    
57
  public final int getNumPuzzleFaces()
58
    {
59
    return NUM_FACES;
60
    }
61

    
62
///////////////////////////////////////////////////////////////////////////////////////////////////
63

    
64
  public int[] getColorTable()
65
    {
66
    return FACE_COLORS;
67
    }
68

    
69
///////////////////////////////////////////////////////////////////////////////////////////////////
70

    
71
  public int getFOV()
72
    {
73
    return FOV;
74
    }
75

    
76
///////////////////////////////////////////////////////////////////////////////////////////////////
77

    
78
  public float getScreenRatio()
79
    {
80
    return RATIO;
81
    }
82
}
(2-2/6)