Project

General

Profile

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

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

1 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2019 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6 4c87f159 Leszek Koltunski
// 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 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
9
10 b31249d6 Leszek Koltunski
package org.distorted.objectlib.shape;
11 29b82486 Leszek Koltunski
12 ecf3d6e3 Leszek Koltunski
import org.distorted.library.type.Static3D;
13 29b82486 Leszek Koltunski
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 29b82486 Leszek Koltunski
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20 386af988 Leszek Koltunski
public abstract class ShapeDodecahedron extends TwistyObject
21 29b82486 Leszek Koltunski
{
22 b0ec8fbd Leszek Koltunski
  public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
23
24 29b82486 Leszek Koltunski
  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 f9337e48 Leszek Koltunski
  public static final int[] FACE_COLORS = new int[]
38 29b82486 Leszek Koltunski
         {
39 9b1fe915 Leszek Koltunski
           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 29b82486 Leszek Koltunski
         };
43
44 f9337e48 Leszek Koltunski
  public static final int NUM_FACES = 12;
45 b31249d6 Leszek Koltunski
  public static final int FOV = 30;
46
  public static final float RATIO = 0.35f;
47 82eb152a Leszek Koltunski
48 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
49
50 cf93ea4e Leszek Koltunski
  public ShapeDodecahedron(int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InitData data, InitAssets asset)
51 29b82486 Leszek Koltunski
    {
52 cf93ea4e Leszek Koltunski
    super(meshState, iconMode, realSize, quat, move, scale, data, asset);
53 29b82486 Leszek Koltunski
    }
54
55
///////////////////////////////////////////////////////////////////////////////////////////////////
56
57 2289cab1 Leszek Koltunski
  public final int getNumFaces()
58 29b82486 Leszek Koltunski
    {
59 82eb152a Leszek Koltunski
    return NUM_FACES;
60 29b82486 Leszek Koltunski
    }
61
62
///////////////////////////////////////////////////////////////////////////////////////////////////
63
64 a75ae1ee Leszek Koltunski
  public int getNumFaceColors()
65 29b82486 Leszek Koltunski
    {
66 82eb152a Leszek Koltunski
    return FACE_COLORS.length;
67 29b82486 Leszek Koltunski
    }
68
69 2289cab1 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
70
71 82eb152a Leszek Koltunski
  public int getColor(int face)
72 2289cab1 Leszek Koltunski
    {
73
    return FACE_COLORS[face];
74
    }
75
76 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
77
78 7ba38dd4 Leszek Koltunski
  public int getFOV()
79 29b82486 Leszek Koltunski
    {
80 82eb152a Leszek Koltunski
    return FOV;
81 29b82486 Leszek Koltunski
    }
82
83
///////////////////////////////////////////////////////////////////////////////////////////////////
84
85 82eb152a Leszek Koltunski
  public float getScreenRatio()
86 29b82486 Leszek Koltunski
    {
87 82eb152a Leszek Koltunski
    return RATIO;
88 29b82486 Leszek Koltunski
    }
89
}