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 java.io.InputStream;
|
13
|
|
14
|
import org.distorted.library.type.Static3D;
|
15
|
import org.distorted.library.type.Static4D;
|
16
|
import org.distorted.objectlib.main.InitData;
|
17
|
import org.distorted.objectlib.main.TwistyObject;
|
18
|
|
19
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
20
|
|
21
|
public abstract class ShapeDodecahedron extends TwistyObject
|
22
|
{
|
23
|
public static final Static4D DEFAULT_ROT = new Static4D(-0.63874420f, 0.25712812f, 0.358450060f, 0.63039730f);
|
24
|
|
25
|
static final int MINX_LGREEN = 0xff53aa00;
|
26
|
static final int MINX_PINK = 0xfffd7ab7;
|
27
|
static final int MINX_SANDY = 0xffefd48b;
|
28
|
static final int MINX_LBLUE = 0xff00a2d7;
|
29
|
static final int MINX_ORANGE = 0xffff6200;
|
30
|
static final int MINX_VIOLET = 0xff7d59a4;
|
31
|
static final int MINX_DGREEN = 0xff007a47;
|
32
|
static final int MINX_DRED = 0xffbd0000;
|
33
|
static final int MINX_DBLUE = 0xff1a29b2;
|
34
|
static final int MINX_DYELLOW= 0xffffc400;
|
35
|
static final int MINX_WHITE = 0xffffffff;
|
36
|
static final int MINX_GREY = 0xff727c7b;
|
37
|
|
38
|
public static final int[] FACE_COLORS = new int[]
|
39
|
{
|
40
|
MINX_DYELLOW, MINX_ORANGE , MINX_DRED , MINX_SANDY,
|
41
|
MINX_DBLUE , MINX_WHITE , MINX_GREY , MINX_LBLUE,
|
42
|
MINX_LGREEN , MINX_VIOLET , MINX_PINK , MINX_DGREEN
|
43
|
};
|
44
|
|
45
|
public static final int NUM_FACES = 12;
|
46
|
public static final int FOV = 30;
|
47
|
public static final float RATIO = 0.35f;
|
48
|
|
49
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
50
|
|
51
|
public ShapeDodecahedron(InitData data, int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InputStream stream)
|
52
|
{
|
53
|
super(data, meshState, iconMode, realSize, quat, move, scale, stream);
|
54
|
}
|
55
|
|
56
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
57
|
|
58
|
public final int getNumFaces()
|
59
|
{
|
60
|
return NUM_FACES;
|
61
|
}
|
62
|
|
63
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
64
|
|
65
|
public int getNumFaceColors()
|
66
|
{
|
67
|
return FACE_COLORS.length;
|
68
|
}
|
69
|
|
70
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
71
|
|
72
|
public int getColor(int face)
|
73
|
{
|
74
|
return FACE_COLORS[face];
|
75
|
}
|
76
|
|
77
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
78
|
|
79
|
public int getFOV()
|
80
|
{
|
81
|
return FOV;
|
82
|
}
|
83
|
|
84
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
85
|
|
86
|
public float getScreenRatio()
|
87
|
{
|
88
|
return RATIO;
|
89
|
}
|
90
|
}
|