Project

General

Profile

« Previous | Next » 

Revision 3543d0dc

Added by Leszek Koltunski over 2 years ago

Axis Cube: all cubits modelled.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyAxis.java
242 242
      {
243 243
      float[][] vertices =
244 244
          {
245
              // TODO
245
              {-1.5f  , 0.0f, 0.0f},
246
              { 0.5f  , 0.0f,-1.0f},
247
              { 1.5f  , 0.0f, 0.0f},
248
              {-0.5f  ,-1.0f, 0.0f},
249
              {-0.5f*T, -2*T, -4*T},
250
              { 0.5f*T, -4*T, -2*T},
246 251
          };
247 252

  
248 253
      int[][] indices =
249 254
          {
250
              // TODO
255
              {0,2,1},
256
              {0,3,2},
257
              {3,5,2},
258
              {1,4,0},
259
              {4,5,3,0},
260
              {5,4,1,2}
251 261
          };
252 262

  
253 263
      return new ObjectShape(vertices, indices);
......
256 266
      {
257 267
      float[][] vertices =
258 268
          {
259
              // TODO
269
              {0.0f, 0.0f, -1.5f  },
270
              {1.0f, 0.0f, -0.5f  },
271
              {0.0f, 0.0f,  1.5f  },
272
              {0.0f,-1.0f,  0.5f  },
273
              { 4*T, -2*T,  0.5f*T},
274
              { 2*T, -4*T, -0.5f*T}
260 275
          };
261 276

  
262 277
      int[][] indices =
263 278
          {
264
              // TODO
279
              {0,2,1},
280
              {0,3,2},
281
              {0,5,3},
282
              {5,4,2,3},
283
              {4,1,2},
284
              {4,5,0,1}
265 285
          };
266 286

  
267 287
      return new ObjectShape(vertices, indices);
......
270 290
      {
271 291
      float[][] vertices =
272 292
          {
273
              // TODO
293
              { 0.0f, 0.0f, 0.0f},
294
              {-1.5f, 0.0f, 0.0f},
295
              { 0.0f,-1.5f, 0.0f},
296
              { 0.0f, 0.0f, 1.5f},
297
              {-1.0f,-1.0f, 1.0f}
274 298
          };
275 299

  
276 300
      int[][] indices =
277 301
          {
278
              // TODO
302
              {1,3,0},
303
              {3,2,0},
304
              {2,1,0},
305
              {3,1,4},
306
              {2,3,4},
307
              {1,2,4}
279 308
          };
280 309

  
281 310
      return new ObjectShape(vertices, indices);
......
284 313
      {
285 314
      float[][] vertices =
286 315
          {
287
              // TODO
316
              {-1.0f, 0.0f, 1.0f},
317
              { 0.0f, 0.0f,-1.0f},
318
              { 1.0f, 0.0f, 0.0f},
319
              {    T, -2*T,   -T}
288 320
          };
289 321

  
290 322
      int[][] indices =
291 323
          {
292
              // TODO
324
              {0,2,1},
325
              {0,3,2},
326
              {2,3,1},
327
              {1,3,0}
293 328
          };
294 329

  
295 330
      return new ObjectShape(vertices, indices);
......
297 332
    }
298 333

  
299 334
///////////////////////////////////////////////////////////////////////////////////////////////////
300
// TODO
301 335

  
302 336
  public ObjectFaceShape getObjectFaceShape(int variant)
303 337
    {
......
319 353
      float[][] centers = { {-1.0f/6, -5.0f/12, 1.0f/24 } };
320 354
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
321 355
      }
356
    else if( variant==2 )
357
      {
358
      float[][] bands   = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
359
      int[] bandIndices = { 0,0,1,1,1,1 };
360
      float[][] corners = { {0.04f,0.09f} };
361
      int[] indices     = { 0,0,0,0,-1,-1 };
362
      float[][] centers = { { 0.0f, -1.0f, -1.0f } };
363
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
364
      }
365
    else if( variant==3 )
366
      {
367
      float[][] bands   = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
368
      int[] bandIndices = { 0,0,1,1,1,1 };
369
      float[][] corners = { {0.04f,0.09f} };
370
      int[] indices     = { 0,0,0,0,-1,-1 };
371
      float[][] centers = { { 1.0f, -1.0f, 0.0f } };
372
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
373
      }
374
    else if( variant==4 )
375
      {
376
      float[][] bands   = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
377
      int[] bandIndices = { 0,0,0,1,1,1 };
378
      float[][] corners = { {0.03f,0.08f} };
379
      int[] indices     = { 0,0,0,0,-1 };
380
      float[][] centers = { { -1.0f, -1.0f, 1.0f } };
381
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
382
      }
322 383
    else
323 384
      {
324 385
      float[][] bands   = { {0.05f,35,0.25f,0.7f,5,1,0}, {0.04f,35,0.25f,0.7f,5,1,0} };
325
      int[] bandIndices = { 1,0,0,1,1,1 };
386
      int[] bandIndices = { 0,1,1,1 };
326 387
      float[][] corners = { {0.04f,0.12f} };
327
      int[] indices     = { 0,0,0,0,0,0,0,0 };
328
      float[][] centers = { {-1.0f/6, -5.0f/12, 1.0f/24} };
388
      int[] indices     = { 0,0,0,-1 };
389
      float[][] centers = { { 1.0f/3, -2.0f/3,-1.0f/3 } };
329 390
      return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
330 391
      }
331 392
    }
332 393

  
333 394
///////////////////////////////////////////////////////////////////////////////////////////////////
334
// really 6
335 395

  
336 396
  public int getNumCubitVariants(int[] numLayers)
337 397
    {
338
    return 2;
398
    return 6;
339 399
    }
340 400

  
341 401
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff