Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyBandagedGeneric.java @ 786098dd

1
///////////////////////////////////////////////////////////////////////////////////////////////////
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
import org.distorted.library.type.Static3D;
23
import org.distorted.library.type.Static4D;
24
import org.distorted.objectlib.scrambling.ScrambleState;
25
import org.distorted.objectlib.scrambling.ScrambleStateBandaged3x3;
26

    
27
import java.io.InputStream;
28

    
29
///////////////////////////////////////////////////////////////////////////////////////////////////
30

    
31
public class TwistyBandagedGeneric extends TwistyBandagedAbstract
32
{
33
  private static long mSignature;
34

    
35
///////////////////////////////////////////////////////////////////////////////////////////////////
36

    
37
  public TwistyBandagedGeneric(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
38
    {
39
    super(numL, meshState, quat, move, scale, stream);
40
    }
41

    
42
///////////////////////////////////////////////////////////////////////////////////////////////////
43
// Andreas signature of a bandaged 3x3
44

    
45
  public static void setSignature(long sig)
46
    {
47
    mSignature = sig;
48
    }
49

    
50
///////////////////////////////////////////////////////////////////////////////////////////////////
51

    
52
  float[][] getPositions()
53
    {
54
    if( POSITIONS==null )
55
      {
56
      POSITIONS = new float[][]
57
        {
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

    
65
          {-1.0f, -1.0f, +1.0f,
66
           -1.0f, -1.0f, +0.0f,
67
           -1.0f, -1.0f, -1.0f },
68

    
69
          { 0.0f, +1.0f, +1.0f},
70
          { 0.0f, +1.0f, +0.0f},
71
          { 0.0f, +1.0f, -1.0f},
72
          { 0.0f,  0.0f, +1.0f},
73
          { 0.0f,  0.0f, -1.0f},
74
          { 0.0f, -1.0f, +1.0f},
75
          { 0.0f, -1.0f, +0.0f},
76
          { 0.0f, -1.0f, -1.0f},
77

    
78
          { 1.0f, +1.0f, +1.0f},
79
          { 1.0f, +1.0f, +0.0f},
80
          { 1.0f, +1.0f, -1.0f},
81
          { 1.0f,  0.0f, +1.0f},
82
          { 1.0f,  0.0f, +0.0f},
83
          { 1.0f, -1.0f, +1.0f},
84

    
85
          { 1.0f,  0.0f, -1.0f,
86
            1.0f, -1.0f, -1.0f,
87
            1.0f, -1.0f, +0.0f },
88
        };
89
      }
90
    return POSITIONS;
91
    }
92

    
93
///////////////////////////////////////////////////////////////////////////////////////////////////
94
// PUBLIC APi
95

    
96
  public String getShortName()
97
    {
98
    return ""+mSignature;
99
    }
100

    
101
///////////////////////////////////////////////////////////////////////////////////////////////////
102

    
103
  public long getSignature()
104
    {
105
    return mSignature;
106
    }
107

    
108
///////////////////////////////////////////////////////////////////////////////////////////////////
109

    
110
  public String getObjectName()
111
    {
112
    return "";
113
    }
114

    
115
///////////////////////////////////////////////////////////////////////////////////////////////////
116

    
117
  public String getInventor()
118
    {
119
    return "??";
120
    }
121

    
122
///////////////////////////////////////////////////////////////////////////////////////////////////
123

    
124
  public int getYearOfInvention()
125
    {
126
    return 0;
127
    }
128

    
129
///////////////////////////////////////////////////////////////////////////////////////////////////
130

    
131
  public int getComplexity()
132
    {
133
    return 4;
134
    }
135

    
136
///////////////////////////////////////////////////////////////////////////////////////////////////
137

    
138
  public String[][] getTutorials()
139
    {
140
    return null;
141
    }
142
}
(7-7/34)