1
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2
|
// Copyright 2023 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.tablebases;
|
11
|
|
12
|
import android.content.res.Resources;
|
13
|
|
14
|
import org.distorted.library.type.Static3D;
|
15
|
import org.distorted.objectlib.objects.TwistyIvy;
|
16
|
|
17
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
18
|
|
19
|
public class TablebasesIvyCube extends TablebasesAbstract
|
20
|
{
|
21
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
22
|
|
23
|
public TablebasesIvyCube()
|
24
|
{
|
25
|
super();
|
26
|
}
|
27
|
|
28
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
29
|
|
30
|
public TablebasesIvyCube(Resources res)
|
31
|
{
|
32
|
super(res,org.distorted.objectlib.R.raw.pduo_2_tablebase);
|
33
|
}
|
34
|
|
35
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
36
|
|
37
|
int[][] getBasicAngles()
|
38
|
{
|
39
|
int[] tmp = {3,3};
|
40
|
return new int[][] { tmp,tmp,tmp,tmp };
|
41
|
}
|
42
|
|
43
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
44
|
|
45
|
Static3D[] getRotationAxis()
|
46
|
{
|
47
|
return TwistyIvy.ROT_AXIS;
|
48
|
}
|
49
|
|
50
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
51
|
|
52
|
float[][] getPosition()
|
53
|
{
|
54
|
final float DIST_CORNER = 1;
|
55
|
final float DIST_CENTER = 1;
|
56
|
|
57
|
return new float[][]
|
58
|
{
|
59
|
{ DIST_CORNER, DIST_CORNER, DIST_CORNER },
|
60
|
{-DIST_CORNER, DIST_CORNER,-DIST_CORNER },
|
61
|
{-DIST_CORNER,-DIST_CORNER, DIST_CORNER },
|
62
|
{ DIST_CORNER,-DIST_CORNER,-DIST_CORNER },
|
63
|
{ 0, 0, DIST_CENTER },
|
64
|
{ 0, 0,-DIST_CENTER },
|
65
|
{ 0, DIST_CENTER, 0 },
|
66
|
{ 0,-DIST_CENTER, 0 },
|
67
|
{ DIST_CENTER, 0, 0 },
|
68
|
{-DIST_CENTER, 0, 0 },
|
69
|
};
|
70
|
}
|
71
|
|
72
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
73
|
|
74
|
float[][] getCuts()
|
75
|
{
|
76
|
float[] cut = { 0.0f };
|
77
|
return new float[][] { cut,cut,cut,cut };
|
78
|
}
|
79
|
|
80
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
81
|
|
82
|
boolean[][] getRotatable()
|
83
|
{
|
84
|
boolean[] tmp = new boolean[] {false,true};
|
85
|
return new boolean[][] { tmp,tmp,tmp,tmp };
|
86
|
}
|
87
|
|
88
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
89
|
// specifically for the tablebase
|
90
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
91
|
// orientations of 4 corners + any even permutation of 6 centers
|
92
|
|
93
|
int getSize()
|
94
|
{
|
95
|
return (3*3*3*3)*(6*5*4*3);
|
96
|
}
|
97
|
|
98
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
99
|
|
100
|
int[] getQuats(int index)
|
101
|
{
|
102
|
return null;
|
103
|
}
|
104
|
|
105
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
106
|
|
107
|
int getIndex(int[] quats)
|
108
|
{
|
109
|
return 0;
|
110
|
}
|
111
|
}
|
112
|
|