Revision f2d0d23e
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objects/TwistyBandaged2Bar.java | ||
---|---|---|
32 | 32 |
|
33 | 33 |
class TwistyBandaged2Bar extends TwistyBandagedAbstract |
34 | 34 |
{ |
35 |
private static final float[][] POSITIONS = new float[][] |
|
36 |
{ |
|
37 |
{ 0.0f, +1.0f, 1.0f, 0.0f, +1.0f, 0.0f, 0.0f, +1.0f, -1.0f}, |
|
38 |
{-1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f}, |
|
39 |
{-1.0f, +1.0f, +1.0f}, |
|
40 |
{-1.0f, +1.0f, 0.0f}, |
|
41 |
{-1.0f, +1.0f, -1.0f}, |
|
42 |
{-1.0f, 0.0f, +1.0f}, |
|
43 |
{-1.0f, 0.0f, 0.0f}, |
|
44 |
{-1.0f, 0.0f, -1.0f}, |
|
45 |
{-1.0f, -1.0f, +1.0f}, |
|
46 |
{-1.0f, -1.0f, -1.0f}, |
|
47 |
{+1.0f, +1.0f, +1.0f}, |
|
48 |
{+1.0f, +1.0f, 0.0f}, |
|
49 |
{+1.0f, +1.0f, -1.0f}, |
|
50 |
{+1.0f, 0.0f, +1.0f}, |
|
51 |
{+1.0f, 0.0f, 0.0f}, |
|
52 |
{+1.0f, 0.0f, -1.0f}, |
|
53 |
{+1.0f, -1.0f, +1.0f}, |
|
54 |
{+1.0f, -1.0f, -1.0f}, |
|
55 |
{ 0.0f, 0.0f, +1.0f}, |
|
56 |
{ 0.0f, -1.0f, +1.0f}, |
|
57 |
{ 0.0f, 0.0f, -1.0f}, |
|
58 |
{ 0.0f, -1.0f, -1.0f} |
|
59 |
}; |
|
60 |
|
|
61 |
private static final int[] QUAT_INDICES = new int[] { 2 }; |
|
62 |
|
|
63 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
64 |
|
|
65 | 35 |
TwistyBandaged2Bar(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh, |
66 | 36 |
DistortedEffects effects, int[][] moves, Resources res, int scrWidth) |
67 | 37 |
{ |
... | ... | |
79 | 49 |
|
80 | 50 |
float[][] getPositions() |
81 | 51 |
{ |
52 |
if( POSITIONS==null ) |
|
53 |
{ |
|
54 |
POSITIONS = new float[][] |
|
55 |
{ |
|
56 |
{ 0.0f, +1.0f, 1.0f, 0.0f, +1.0f, 0.0f, 0.0f, +1.0f, -1.0f}, |
|
57 |
{-1.0f, -1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 1.0f, -1.0f, 0.0f}, |
|
58 |
{-1.0f, +1.0f, +1.0f}, |
|
59 |
{-1.0f, +1.0f, 0.0f}, |
|
60 |
{-1.0f, +1.0f, -1.0f}, |
|
61 |
{-1.0f, 0.0f, +1.0f}, |
|
62 |
{-1.0f, 0.0f, 0.0f}, |
|
63 |
{-1.0f, 0.0f, -1.0f}, |
|
64 |
{-1.0f, -1.0f, +1.0f}, |
|
65 |
{-1.0f, -1.0f, -1.0f}, |
|
66 |
{+1.0f, +1.0f, +1.0f}, |
|
67 |
{+1.0f, +1.0f, 0.0f}, |
|
68 |
{+1.0f, +1.0f, -1.0f}, |
|
69 |
{+1.0f, 0.0f, +1.0f}, |
|
70 |
{+1.0f, 0.0f, 0.0f}, |
|
71 |
{+1.0f, 0.0f, -1.0f}, |
|
72 |
{+1.0f, -1.0f, +1.0f}, |
|
73 |
{+1.0f, -1.0f, -1.0f}, |
|
74 |
{ 0.0f, 0.0f, +1.0f}, |
|
75 |
{ 0.0f, -1.0f, +1.0f}, |
|
76 |
{ 0.0f, 0.0f, -1.0f}, |
|
77 |
{ 0.0f, -1.0f, -1.0f} |
|
78 |
}; |
|
79 |
} |
|
80 |
|
|
82 | 81 |
return POSITIONS; |
83 | 82 |
} |
84 | 83 |
|
... | ... | |
86 | 85 |
|
87 | 86 |
int[] getQuatIndices() |
88 | 87 |
{ |
88 |
if( QUAT_INDICES==null ) |
|
89 |
{ |
|
90 |
QUAT_INDICES = new int[] { 2 }; |
|
91 |
} |
|
92 |
|
|
89 | 93 |
return QUAT_INDICES; |
90 | 94 |
} |
91 | 95 |
|
Also available in: Unified diff
Remove statics from the Bandaged Cube classes.