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 org.distorted.library.type.Static3D;
|
13
|
import org.distorted.library.type.Static4D;
|
14
|
import org.distorted.objectlib.main.InitAssets;
|
15
|
import org.distorted.objectlib.main.TwistyObject;
|
16
|
import org.distorted.objectlib.metadata.Metadata;
|
17
|
|
18
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
19
|
|
20
|
public abstract class ShapeOctahedron extends TwistyObject
|
21
|
{
|
22
|
public static final Static4D DEFAULT_ROT = new Static4D(-0.31521368f, 0.36868167f, -0.6488994f, 0.5862124f);
|
23
|
|
24
|
public static final int[] FACE_COLORS = new int[]
|
25
|
{
|
26
|
COLOR_VIOLET, COLOR_GREY ,
|
27
|
COLOR_BLUE , COLOR_RED ,
|
28
|
COLOR_ORANGE, COLOR_GREEN ,
|
29
|
COLOR_WHITE , COLOR_YELLOW
|
30
|
};
|
31
|
|
32
|
public static final int NUM_FACES = 8;
|
33
|
public static final int FOV = 40;
|
34
|
public static final float RATIO = 0.68f;
|
35
|
|
36
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
37
|
|
38
|
public ShapeOctahedron(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
|
39
|
{
|
40
|
super(iconMode, realSize, quat, move, scale, meta, asset);
|
41
|
}
|
42
|
|
43
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
44
|
|
45
|
public final int getNumFaces()
|
46
|
{
|
47
|
return NUM_FACES;
|
48
|
}
|
49
|
|
50
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
51
|
|
52
|
public int[] getColorTable()
|
53
|
{
|
54
|
return FACE_COLORS;
|
55
|
}
|
56
|
|
57
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
58
|
|
59
|
public int getFOV()
|
60
|
{
|
61
|
return FOV;
|
62
|
}
|
63
|
|
64
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
65
|
|
66
|
public float getScreenRatio()
|
67
|
{
|
68
|
return RATIO;
|
69
|
}
|
70
|
}
|