Project

General

Profile

« Previous | Next » 

Revision 7d8cc029

Added by Leszek Koltunski about 3 years ago

Simplify.

View differences:

src/main/java/org/distorted/objects/TwistyBandagedEvil.java
209 209
        { 1.0f, -1.0f, -1.0f,  1.0f,  0.0f, -1.0f}
210 210
      };
211 211

  
212
  private final double[][] VERTICES_SMALL = new double[][]
213
          {
214
              { 0.5, 0.5, 0.5 },
215
              { 0.5, 0.5,-0.5 },
216
              { 0.5,-0.5, 0.5 },
217
              { 0.5,-0.5,-0.5 },
218
              {-0.5, 0.5, 0.5 },
219
              {-0.5, 0.5,-0.5 },
220
              {-0.5,-0.5, 0.5 },
221
              {-0.5,-0.5,-0.5 },
222
          };
223

  
224
  private final double[][] VERTICES_MEDIUM = new double[][]
225
          {
226
              // TODO
227
          };
228

  
229
  private final double[][] VERTICES_BIG = new double[][]
230
          {
231
              // TODO
232
          };
233

  
234
  private final int[][] VERT_INDEXES = new int[][]
235
          {
236
              {2,3,1,0},   // counterclockwise!
237
              {7,6,4,5},
238
              {4,0,1,5},
239
              {7,3,2,6},
240
              {6,2,0,4},
241
              {3,7,5,1}
242
          };
243

  
244 212
  private static final int[] QUAT_INDICES = new int[]
245 213
      { 0, 1, 0, 0, 0, 2, 2, 2, 3, 3, 3, 3, 3 };
246 214

  
......
252 220
    super(size, quat, texture, mesh, effects, moves, ObjectList.BAN4, res, scrWidth);
253 221
    }
254 222

  
255
///////////////////////////////////////////////////////////////////////////////////////////////////
256

  
257
  double[][] getVertices(int cubitType)
258
    {
259
     if( cubitType==0 )  // Small cubit
260
      {
261
      return VERTICES_SMALL;
262
      }
263
    if( cubitType==1 )  // Medium cubit
264
      {
265
      return VERTICES_MEDIUM;
266
      }
267
    if( cubitType==2 )  // Big cubit
268
      {
269
      return VERTICES_BIG;
270
      }
271

  
272
    return null;
273
    }
274

  
275
///////////////////////////////////////////////////////////////////////////////////////////////////
276

  
277
  int[][] getVertIndexes(int cubitType)
278
    {
279
    return VERT_INDEXES;
280
    }
281

  
282
///////////////////////////////////////////////////////////////////////////////////////////////////
283

  
284
  int getNumCubitTypes(int numLayers)
285
    {
286
    return 3;
287
    }
288

  
289 223
///////////////////////////////////////////////////////////////////////////////////////////////////
290 224

  
291 225
  float[][] getPositions()

Also available in: Unified diff