Project

General

Profile

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

distorted-objectlib / src / main / java / org / distorted / objectlib / objects / TwistyBandagedGeneric.java @ 29ad5fc9

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

    
25
import java.io.InputStream;
26

    
27
///////////////////////////////////////////////////////////////////////////////////////////////////
28

    
29
public class TwistyBandagedGeneric extends TwistyBandagedAbstract
30
{
31
  private static long mSignature;
32

    
33
///////////////////////////////////////////////////////////////////////////////////////////////////
34

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

    
40
///////////////////////////////////////////////////////////////////////////////////////////////////
41
// Andreas signature of a bandaged 3x3
42

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

    
48
///////////////////////////////////////////////////////////////////////////////////////////////////
49

    
50
  float[][] getPositions()
51
    {
52
    if( POSITIONS==null )
53
      {
54
      POSITIONS = new float[][]
55
        {
56

    
57
          {-1.0f, +1.0f, +1.0f,
58
           -1.0f, +1.0f, +0.0f,
59
           -1.0f, +1.0f, -1.0f,
60
           -1.0f,  0.0f, +1.0f,
61
           -1.0f,  0.0f, +0.0f,
62
           -1.0f,  0.0f, -1.0f },
63

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

    
68
/*
69
          {-1.0f, +1.0f, +1.0f},
70
          {-1.0f, +1.0f, +0.0f},
71
          {-1.0f, +1.0f, -1.0f},
72
          {-1.0f,  0.0f, +1.0f},
73
          {-1.0f,  0.0f, +0.0f},
74
          {-1.0f,  0.0f, -1.0f},
75

    
76
          {-1.0f, -1.0f, +1.0f},
77
          {-1.0f, -1.0f, +0.0f},
78
          {-1.0f, -1.0f, -1.0f},
79
*/
80
          { 0.0f, +1.0f, +1.0f},
81
          { 0.0f, +1.0f, +0.0f},
82
          { 0.0f, +1.0f, -1.0f},
83
          { 0.0f,  0.0f, +1.0f},
84
          { 0.0f,  0.0f, -1.0f},
85
          { 0.0f, -1.0f, +1.0f},
86
          { 0.0f, -1.0f, +0.0f},
87

    
88
          { 1.0f, +1.0f, +1.0f},
89
          { 1.0f, +1.0f, +0.0f},
90
          { 1.0f, +1.0f, -1.0f},
91
          { 1.0f,  0.0f, +1.0f},
92
          { 1.0f,  0.0f, +0.0f},
93
          { 1.0f, -1.0f, +1.0f},
94

    
95
          { 1.0f,  0.0f, -1.0f,
96
            1.0f, -1.0f, -1.0f,
97
            1.0f, -1.0f, +0.0f,
98
            0.0f, -1.0f, -1.0f },
99
        };
100
      }
101
    return POSITIONS;
102
    }
103

    
104
///////////////////////////////////////////////////////////////////////////////////////////////////
105
// PUBLIC APi
106

    
107
  public String getShortName()
108
    {
109
    return ""+mSignature;
110
    }
111

    
112
///////////////////////////////////////////////////////////////////////////////////////////////////
113

    
114
  public long getSignature()
115
    {
116
    return mSignature;
117
    }
118

    
119
///////////////////////////////////////////////////////////////////////////////////////////////////
120

    
121
  public String getObjectName()
122
    {
123
    return "";
124
    }
125

    
126
///////////////////////////////////////////////////////////////////////////////////////////////////
127

    
128
  public String getInventor()
129
    {
130
    return "??";
131
    }
132

    
133
///////////////////////////////////////////////////////////////////////////////////////////////////
134

    
135
  public int getYearOfInvention()
136
    {
137
    return 0;
138
    }
139

    
140
///////////////////////////////////////////////////////////////////////////////////////////////////
141

    
142
  public int getComplexity()
143
    {
144
    return 4;
145
    }
146

    
147
///////////////////////////////////////////////////////////////////////////////////////////////////
148

    
149
  public String[][] getTutorials()
150
    {
151
    return null;
152
    }
153
}
(7-7/34)