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.TwistyObject;
|
16 |
ae9d9227
|
leszek
|
import org.distorted.objectlib.metadata.Metadata;
|
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 |
d2cf182b
|
Leszek Koltunski
|
public static final int COLOR_BALL_1 = 0xffcc0000;
|
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 |
d2cf182b
|
Leszek Koltunski
|
public static final int COLOR_BALL_6 = 0xff48ad62;
|
30 |
|
|
public static final int COLOR_BALL_7 = 0xffedca54;
|
31 |
|
|
public static final int COLOR_BALL_8 = 0xfffe5740;
|
32 |
54588439
|
Leszek Koltunski
|
|
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 |
ae9d9227
|
leszek
|
public ShapeDiamond(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
|
52 |
54588439
|
Leszek Koltunski
|
{
|
53 |
ae9d9227
|
leszek
|
super(iconMode, realSize, quat, move, scale, meta, asset);
|
54 |
54588439
|
Leszek Koltunski
|
}
|
55 |
|
|
|
56 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
57 |
|
|
|
58 |
1eafa9c6
|
leszek
|
public final int getNumPuzzleFaces()
|
59 |
54588439
|
Leszek Koltunski
|
{
|
60 |
|
|
return NUM_FACES;
|
61 |
|
|
}
|
62 |
|
|
|
63 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
64 |
|
|
|
65 |
962b8ff6
|
leszek
|
public int[] getColorTable()
|
66 |
54588439
|
Leszek Koltunski
|
{
|
67 |
962b8ff6
|
leszek
|
return FACE_COLORS;
|
68 |
54588439
|
Leszek Koltunski
|
}
|
69 |
|
|
|
70 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
71 |
|
|
|
72 |
|
|
public int getFOV()
|
73 |
|
|
{
|
74 |
|
|
return FOV;
|
75 |
|
|
}
|
76 |
|
|
|
77 |
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
78 |
|
|
|
79 |
|
|
public float getScreenRatio()
|
80 |
|
|
{
|
81 |
|
|
return RATIO;
|
82 |
|
|
}
|
83 |
|
|
}
|