1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2024 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
|
import static org.distorted.objectlib.shape.ShapeColors.*;
|
19
|
|
20
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
21
|
|
22
|
public abstract class ShapeBarrel extends TwistyObject
|
23
|
{
|
24
|
public static final Static4D DEFAULT_ROT = new Static4D(-0.09848663f, 0.6306283f, 0.67572856f, 0.36878252f);
|
25
|
|
26
|
public static final int[] FACE_COLORS = new int[]
|
27
|
{
|
28
|
COLOR_VIOLET, COLOR_GREY,
|
29
|
COLOR_BLUE, COLOR_RED,
|
30
|
COLOR_ORANGE, COLOR_LGREEN,
|
31
|
COLOR_WHITE, COLOR_YELLOW
|
32
|
};
|
33
|
|
34
|
public static final int NUM_FACES = 8;
|
35
|
public static final int FOV = 40;
|
36
|
public static final float RATIO = 0.75f;
|
37
|
|
38
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
39
|
|
40
|
public ShapeBarrel(int iconMode, float realSize, Static4D quat, Static3D move, float scale, Metadata meta, InitAssets asset)
|
41
|
{
|
42
|
super(iconMode, realSize, quat, move, scale, meta, asset);
|
43
|
}
|
44
|
|
45
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
46
|
|
47
|
public final int getNumPuzzleFaces()
|
48
|
{
|
49
|
return NUM_FACES;
|
50
|
}
|
51
|
|
52
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
53
|
|
54
|
public int[] getColorTable()
|
55
|
{
|
56
|
return FACE_COLORS;
|
57
|
}
|
58
|
|
59
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
60
|
|
61
|
public int getFOV()
|
62
|
{
|
63
|
return FOV;
|
64
|
}
|
65
|
|
66
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
67
|
|
68
|
public float getScreenRatio()
|
69
|
{
|
70
|
return RATIO;
|
71
|
}
|
72
|
}
|