Project

General

Profile

Download (4.65 KB) Statistics
| Branch: | Revision:

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyBandaged2Bar.java @ a4af26c1

1 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
2
// Copyright 2021 Leszek Koltunski                                                               //
3
//                                                                                               //
4
// This file is part of Magic Cube.                                                              //
5
//                                                                                               //
6
// Magic Cube is free software: you can redistribute it and/or modify                            //
7
// it under the terms of the GNU General Public License as published by                          //
8
// the Free Software Foundation, either version 2 of the License, or                             //
9
// (at your option) any later version.                                                           //
10
//                                                                                               //
11
// Magic Cube is distributed in the hope that it will be useful,                                 //
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                 //
14
// GNU General Public License for more details.                                                  //
15
//                                                                                               //
16
// You should have received a copy of the GNU General Public License                             //
17
// along with Magic Cube.  If not, see <http://www.gnu.org/licenses/>.                           //
18
///////////////////////////////////////////////////////////////////////////////////////////////////
19
20
package org.distorted.objectlib.objects;
21
22 82eb152a Leszek Koltunski
import java.io.InputStream;
23 29b82486 Leszek Koltunski
24 ecf3d6e3 Leszek Koltunski
import org.distorted.library.type.Static3D;
25 29b82486 Leszek Koltunski
import org.distorted.library.type.Static4D;
26
27 8005e762 Leszek Koltunski
import org.distorted.objectlib.main.ObjectType;
28 29b82486 Leszek Koltunski
29
///////////////////////////////////////////////////////////////////////////////////////////////////
30
31
public class TwistyBandaged2Bar extends TwistyBandagedAbstract
32
{
33 3bf19410 Leszek Koltunski
  public TwistyBandaged2Bar(int[] numL, int meshState, int iconMode, Static4D quat, Static3D move, float scale, InputStream stream)
34 29b82486 Leszek Koltunski
    {
35 3bf19410 Leszek Koltunski
    super(numL, meshState, iconMode, quat, move, scale, stream);
36 29b82486 Leszek Koltunski
    }
37
38
///////////////////////////////////////////////////////////////////////////////////////////////////
39
40
  float[][] getPositions()
41
    {
42
    if( POSITIONS==null )
43
      {
44
      POSITIONS = new float[][]
45
        {
46
         { 0.0f, +1.0f,  1.0f, 0.0f, +1.0f,  0.0f, 0.0f, +1.0f, -1.0f},
47
         {-1.0f, -1.0f,  0.0f, 0.0f, -1.0f,  0.0f, 1.0f, -1.0f,  0.0f},
48
         {-1.0f, +1.0f, +1.0f},
49
         {-1.0f, +1.0f,  0.0f},
50
         {-1.0f, +1.0f, -1.0f},
51
         {-1.0f,  0.0f, +1.0f},
52
         {-1.0f,  0.0f,  0.0f},
53
         {-1.0f,  0.0f, -1.0f},
54
         {-1.0f, -1.0f, +1.0f},
55
         {-1.0f, -1.0f, -1.0f},
56
         {+1.0f, +1.0f, +1.0f},
57
         {+1.0f, +1.0f,  0.0f},
58
         {+1.0f, +1.0f, -1.0f},
59
         {+1.0f,  0.0f, +1.0f},
60
         {+1.0f,  0.0f,  0.0f},
61
         {+1.0f,  0.0f, -1.0f},
62
         {+1.0f, -1.0f, +1.0f},
63
         {+1.0f, -1.0f, -1.0f},
64
         { 0.0f,  0.0f, +1.0f},
65
         { 0.0f, -1.0f, +1.0f},
66
         { 0.0f,  0.0f, -1.0f},
67
         { 0.0f, -1.0f, -1.0f}
68
        };
69
      }
70
71
    return POSITIONS;
72
    }
73
74
///////////////////////////////////////////////////////////////////////////////////////////////////
75
// PUBLIC API
76
77 5f54927b Leszek Koltunski
  public String getShortName()
78 61aa85e4 Leszek Koltunski
    {
79 5f54927b Leszek Koltunski
    return ObjectType.BAN2_3.name();
80
    }
81
82 61aa85e4 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
83
84 e26eb4e7 Leszek Koltunski
  public String getObjectName()
85 29b82486 Leszek Koltunski
    {
86 e26eb4e7 Leszek Koltunski
    return "2Bar Cube";
87 29b82486 Leszek Koltunski
    }
88
89
///////////////////////////////////////////////////////////////////////////////////////////////////
90
91 e26eb4e7 Leszek Koltunski
  public String getInventor()
92 29b82486 Leszek Koltunski
    {
93 b4223a92 Leszek Koltunski
    return "Unknown";
94 29b82486 Leszek Koltunski
    }
95
96 59c20632 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
97
98 e26eb4e7 Leszek Koltunski
  public int getYearOfInvention()
99 59c20632 Leszek Koltunski
    {
100 b4223a92 Leszek Koltunski
    return 0;
101 59c20632 Leszek Koltunski
    }
102
103 29b82486 Leszek Koltunski
///////////////////////////////////////////////////////////////////////////////////////////////////
104
105 e26eb4e7 Leszek Koltunski
  public int getComplexity()
106 29b82486 Leszek Koltunski
    {
107 b4223a92 Leszek Koltunski
    return 2;
108 29b82486 Leszek Koltunski
    }
109 052e0362 Leszek Koltunski
110
///////////////////////////////////////////////////////////////////////////////////////////////////
111
112
  public String[][] getTutorials()
113
    {
114
    return new String[][]{
115
                          {"ru","lS_EK0PMWI8","Как собрать 2-bar Cube","Алексей Ярыгин"},
116
                          {"pl","tX8ubTLh6p8","Bandaged 3x3 (Two bar)","MrUK"},
117
                          {"kr","NE6XuC1r8xw","밴디지 큐브","Denzel Washington"},
118
                         };
119
    }
120 29b82486 Leszek Koltunski
}