1 |
54588439
|
Leszek Koltunski
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
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 |
b31249d6
|
Leszek Koltunski
|
package org.distorted.objectlib.shape;
|
11 |
54588439
|
Leszek Koltunski
|
|
12 |
|
|
import org.distorted.library.type.Static3D;
|
13 |
|
|
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 |
54588439
|
Leszek Koltunski
|
|
18 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19 |
|
|
|
20 |
|
|
public abstract class ShapeDiamond extends TwistyObject
|
21 |
|
|
{
|
22 |
a76330cc
|
Leszek Koltunski
|
public static final Static4D DEFAULT_ROT = new Static4D(-0.09848663f, 0.6306283f, 0.67572856f, 0.36878252f);
|
23 |
54588439
|
Leszek Koltunski
|
|
24 |
c1452814
|
Leszek Koltunski
|
public static final int COLOR_BALL_1 = 0xffff0000;
|
25 |
54588439
|
Leszek Koltunski
|
public static final int COLOR_BALL_2 = 0xffcb2d6a;
|
26 |
|
|
public static final int COLOR_BALL_3 = 0xff4ec9d0;
|
27 |
|
|
public static final int COLOR_BALL_4 = 0xff4678ab;
|
28 |
|
|
public static final int COLOR_BALL_5 = 0xff057350;
|
29 |
|
|
public static final int COLOR_BALL_6 = 0xff289d42;
|
30 |
|
|
public static final int COLOR_BALL_7 = 0xffddba44;
|
31 |
|
|
public static final int COLOR_BALL_8 = 0xffee4713;
|
32 |
|
|
|
33 |
f9337e48
|
Leszek Koltunski
|
public static final int[] FACE_COLORS = new int[]
|
34 |
54588439
|
Leszek Koltunski
|
{
|
35 |
|
|
COLOR_BALL_1, COLOR_BALL_1,
|
36 |
|
|
COLOR_BALL_2, COLOR_BALL_2,
|
37 |
|
|
COLOR_BALL_3, COLOR_BALL_3,
|
38 |
|
|
COLOR_BALL_4, COLOR_BALL_4,
|
39 |
|
|
COLOR_BALL_5, COLOR_BALL_5,
|
40 |
|
|
COLOR_BALL_6, COLOR_BALL_6,
|
41 |
|
|
COLOR_BALL_7, COLOR_BALL_7,
|
42 |
|
|
COLOR_BALL_8, COLOR_BALL_8,
|
43 |
|
|
};
|
44 |
|
|
|
45 |
f9337e48
|
Leszek Koltunski
|
public static final int NUM_FACES = 16;
|
46 |
b31249d6
|
Leszek Koltunski
|
public static final int FOV = 40;
|
47 |
|
|
public static final float RATIO = 0.75f;
|
48 |
54588439
|
Leszek Koltunski
|
|
49 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
50 |
|
|
|
51 |
cf93ea4e
|
Leszek Koltunski
|
public ShapeDiamond(int meshState, int iconMode, float realSize, Static4D quat, Static3D move, float scale, InitData data, InitAssets asset)
|
52 |
54588439
|
Leszek Koltunski
|
{
|
53 |
cf93ea4e
|
Leszek Koltunski
|
super(meshState, iconMode, realSize, quat, move, scale, data, asset);
|
54 |
54588439
|
Leszek Koltunski
|
}
|
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 |
|
|
}
|