Project

General

Profile

« Previous | Next » 

Revision c3a033e9

Added by Leszek Koltunski over 2 years ago

Introduce 'Simple' and 'Nice' meshes.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java
42 42

  
43 43
///////////////////////////////////////////////////////////////////////////////////////////////////
44 44

  
45
  public TwistyMegaminx(int[] numL, Static4D quat, Static3D move, float scale, InputStream stream)
45
  public TwistyMegaminx(int[] numL, int meshState, Static4D quat, Static3D move, float scale, InputStream stream)
46 46
    {
47
    super(numL, quat, move, scale, stream);
47
    super(numL, meshState, quat, move, scale, stream);
48 48
    }
49 49

  
50 50
///////////////////////////////////////////////////////////////////////////////////////////////////
......
370 370
        {
371 371
          {-X1,+Y1*sinA, Y1*cosA},
372 372
          {-X2,-Y2*sinA,-Y2*cosA},
373
          { 0 ,-R*sinA, -R*cosA},
373
          { 0 ,-R*sinA ,-R*cosA },
374 374
          {+X2,-Y2*sinA,-Y2*cosA},
375
          {+X1,+Y1*sinA, Y1*cosA}
375
          {+X1,+Y1*sinA, Y1*cosA},
376
          { 0 , R*cosA ,-R*sinA }
376 377
        };
377 378

  
378 379
      int[][] vertIndexes = new int[][]
379 380
        {
380 381
          {0,1,2,3,4},
381
          {0,1,2,3,4}
382
          {0,1,5},
383
          {1,2,5},
384
          {2,3,5},
385
          {3,4,5},
386
          {4,0,5}
382 387
        };
383 388

  
384 389
      int N = small ? 4 : 3;
......
389 394
         {0.00f,45, R/3,0.2f,2,0,0}
390 395
        };
391 396

  
392
      int[] bandIndices   = new int[] { 0,1 };
397
      int[] bandIndices   = new int[] { 0,1,1,1,1,1 };
393 398
      float[][] corners   = new float[][] { {0.04f,0.10f} };
394
      int[] cornerIndices = new int[] { -1,-1,-1,-1, -1 };
399
      int[] cornerIndices = new int[] { -1,-1,-1,-1, -1,-1 };
395 400
      float[][] centers   = new float[][] { {0.0f, 0.0f, 0.0f} };
396
      int[] centerIndices = new int[] { -1,-1,-1,-1, -1 };
401
      int[] centerIndices = new int[] { -1,-1,-1,-1, -1,-1 };
397 402

  
398 403
      return new ObjectShape(vertices,vertIndexes,bands,bandIndices,corners,cornerIndices,centers,centerIndices,getNumCubitFaces(), null);
399 404
      }

Also available in: Unified diff