Project

General

Profile

« Previous | Next » 

Revision bdbbb4c5

Added by Leszek Koltunski over 2 years ago

Refactoring: split the 'objects' package into two, 'objects' and 'objectlib'.
The point: we're going to need to move the 'objectlib' stuff into its own library module, and that's because we're going to create a new app module which needs access to it.

View differences:

src/main/java/org/distorted/objects/TwistyDino.java
19 19

  
20 20
package org.distorted.objects;
21 21

  
22
import static org.distorted.objects.Movement.TYPE_SPLIT_CORNER;
22
import static org.distorted.objectlb.Movement.TYPE_SPLIT_CORNER;
23 23

  
24 24
import android.content.res.Resources;
25 25

  
26
import org.distorted.helpers.ObjectShape;
27
import org.distorted.helpers.ObjectSticker;
28
import org.distorted.helpers.ScrambleState;
26
import org.distorted.objectlb.ObjectShape;
27
import org.distorted.objectlb.ObjectSticker;
28
import org.distorted.objectlb.ScrambleState;
29 29
import org.distorted.library.main.DistortedEffects;
30 30
import org.distorted.library.main.DistortedTexture;
31 31
import org.distorted.library.mesh.MeshSquare;
32 32
import org.distorted.library.type.Static3D;
33 33
import org.distorted.library.type.Static4D;
34
import org.distorted.objectlb.Movement;
35
import org.distorted.objectlb.Movement6;
36
import org.distorted.objectlb.ObjectList;
37
import org.distorted.objectlb.Twisty6;
34 38

  
35 39
///////////////////////////////////////////////////////////////////////////////////////////////////
36 40

  
37
public abstract class TwistyDino extends Twisty6
41
abstract class TwistyDino extends Twisty6
38 42
{
39 43
  // the four rotation axis of a RubikDino. Must be normalized.
40 44
  static final Static3D[] ROT_AXIS = new Static3D[]
......
95 99

  
96 100
///////////////////////////////////////////////////////////////////////////////////////////////////
97 101

  
98
  Static4D[] getQuats()
102
  protected Static4D[] getQuats()
99 103
    {
100 104
    if( mQuats==null ) initializeQuats();
101 105
    return mQuats;
......
103 107

  
104 108
///////////////////////////////////////////////////////////////////////////////////////////////////
105 109

  
106
  float[][] getCuts(int size)
110
  protected float[][] getCuts(int size)
107 111
    {
108 112
    if( mCuts==null )
109 113
      {
......
129 133

  
130 134
///////////////////////////////////////////////////////////////////////////////////////////////////
131 135

  
132
  int getNumStickerTypes(int numLayers)
136
  protected int getNumStickerTypes(int numLayers)
133 137
    {
134 138
    return 1;
135 139
    }
136 140

  
137 141
///////////////////////////////////////////////////////////////////////////////////////////////////
138 142

  
139
  int getNumCubitFaces()
143
  protected int getNumCubitFaces()
140 144
    {
141 145
    return 4;
142 146
    }
143 147

  
144 148
///////////////////////////////////////////////////////////////////////////////////////////////////
145 149

  
146
  float[][] getCubitPositions(int size)
150
  protected float[][] getCubitPositions(int size)
147 151
    {
148 152
    if( mCenters ==null )
149 153
      {
......
169 173

  
170 174
///////////////////////////////////////////////////////////////////////////////////////////////////
171 175

  
172
  ObjectShape getObjectShape(int cubit, int numLayers)
176
  protected ObjectShape getObjectShape(int cubit, int numLayers)
173 177
    {
174 178
    double[][] vertices = new double[][] { {-1.5, 0.0, 0.0},{ 1.5, 0.0, 0.0},{ 0.0,-1.5, 0.0},{ 0.0, 0.0,-1.5} };
175 179
    int[][] vert_indices= new int[][] { {2,1,0},{3,0,1},{2,3,1},{3,2,0} };
......
184 188

  
185 189
///////////////////////////////////////////////////////////////////////////////////////////////////
186 190

  
187
  Static4D getQuat(int cubit, int numLayers)
191
  protected Static4D getQuat(int cubit, int numLayers)
188 192
    {
189 193
    if( mQuats==null ) initializeQuats();
190 194
    return mQuats[cubit];
......
192 196

  
193 197
///////////////////////////////////////////////////////////////////////////////////////////////////
194 198

  
195
  int getNumCubitVariants(int numLayers)
199
  protected int getNumCubitVariants(int numLayers)
196 200
    {
197 201
    return 1;
198 202
    }
199 203

  
200 204
///////////////////////////////////////////////////////////////////////////////////////////////////
201 205

  
202
  int getCubitVariant(int cubit, int numLayers)
206
  protected int getCubitVariant(int cubit, int numLayers)
203 207
    {
204 208
    return 0;
205 209
    }
206 210

  
207 211
///////////////////////////////////////////////////////////////////////////////////////////////////
208 212

  
209
  ObjectSticker retSticker(int face)
213
  protected ObjectSticker retSticker(int face)
210 214
    {
211 215
    if( mStickers==null )
212 216
      {

Also available in: Unified diff