Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / main / ShapeDodecahedron.java @ b3b79e9b

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.main;
11

    
12
import java.io.InputStream;
13

    
14
import org.distorted.library.type.Static3D;
15
import org.distorted.library.type.Static4D;
16

    
17
///////////////////////////////////////////////////////////////////////////////////////////////////
18

    
19
public abstract class ShapeDodecahedron extends TwistyObject
20
{
21
  public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
22

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

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

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

    
47
///////////////////////////////////////////////////////////////////////////////////////////////////
48

    
49
  public ShapeDodecahedron(InitData data, int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InputStream stream)
50
    {
51
    super(data, meshState, iconMode, realSize, quat, move, scale, stream);
52
    }
53

    
54
///////////////////////////////////////////////////////////////////////////////////////////////////
55

    
56
  public final int getNumFaces()
57
    {
58
    return NUM_FACES;
59
    }
60

    
61
///////////////////////////////////////////////////////////////////////////////////////////////////
62

    
63
  public int getNumFaceColors()
64
    {
65
    return FACE_COLORS.length;
66
    }
67

    
68
///////////////////////////////////////////////////////////////////////////////////////////////////
69

    
70
  public int getColor(int face)
71
    {
72
    return FACE_COLORS[face];
73
    }
74

    
75
///////////////////////////////////////////////////////////////////////////////////////////////////
76

    
77
  public int getFOV()
78
    {
79
    return FOV;
80
    }
81

    
82
///////////////////////////////////////////////////////////////////////////////////////////////////
83

    
84
  public float getScreenRatio()
85
    {
86
    return RATIO;
87
    }
88
}
(7-7/13)