Project

General

Profile

« Previous | Next » 

Revision bbc6da6c

Added by Leszek Koltunski over 3 years ago

Megaminx family: part1 (doesn't work yet)

View differences:

src/main/java/org/distorted/objects/FactoryCubit.java
674 674
    return new MeshJoined(meshes);
675 675
    }
676 676

  
677

  
678
///////////////////////////////////////////////////////////////////////////////////////////////////
679

  
680
  MeshBase createFacesMinxCorner()
681
    {
682
    MeshBase[] meshes = new MeshPolygon[6];
683

  
684
    float[] vertices0 = {  };   // TODO
685
    float[] bands0 = computeBands(0.03f,27,0.25f,0.5f,5);
686
    float[] vertices1 = {  };   // TODO
687
    float[] bands1 = computeBands(0.00f,27,0.25f,0.5f,2);
688

  
689
    meshes[0] = new MeshPolygon(vertices0, bands0, 1, 1);
690
    meshes[0].setEffectAssociation(0, 1,0);
691
    meshes[1] = meshes[0].copy(true);
692
    meshes[1].setEffectAssociation(0, 2,0);
693
    meshes[2] = meshes[0].copy(true);
694
    meshes[2].setEffectAssociation(0, 4,0);
695
    meshes[3] = new MeshPolygon(vertices1, bands1, 0, 0);
696
    meshes[3].setEffectAssociation(0, 8,0);
697
    meshes[4] = meshes[3].copy(true);
698
    meshes[4].setEffectAssociation(0,16,0);
699
    meshes[5] = meshes[3].copy(true);
700
    meshes[5].setEffectAssociation(0,32,0);
701

  
702
    return new MeshJoined(meshes);
703
    }
704

  
677 705
///////////////////////////////////////////////////////////////////////////////////////////////////
678 706
// EFFECTS
679 707
///////////////////////////////////////////////////////////////////////////////////////////////////
......
1171 1199
    return effect;
1172 1200
    }
1173 1201

  
1202
///////////////////////////////////////////////////////////////////////////////////////////////////
1203

  
1204
  VertexEffect[] createVertexEffectsMinxCorner()
1205
    {
1206
    // TODO
1207

  
1208
    return null;
1209
    }
1210

  
1174 1211
///////////////////////////////////////////////////////////////////////////////////////////////////
1175 1212
// OBJECTS
1176 1213
///////////////////////////////////////////////////////////////////////////////////////////////////
......
1521 1558

  
1522 1559
    mesh.mergeEffComponents();
1523 1560

  
1561
    return mesh;
1562
    }
1563

  
1564
///////////////////////////////////////////////////////////////////////////////////////////////////
1565

  
1566
  MeshBase createMinxCornerMesh()
1567
    {
1568
    MeshBase mesh = createFacesMinxCorner();
1569
    VertexEffect[] effects = createVertexEffectsMinxCorner();
1570
    for( VertexEffect effect : effects ) mesh.apply(effect);
1571
/*
1572
    Static3D center = new Static3D(0.0f,-0.5f,-0.5f);
1573
    Static3D[] vertices = new Static3D[2];
1574
    vertices[0] = new Static3D(+0.5f,+0.0f,+0.0f);
1575
    vertices[1] = new Static3D(-0.5f,+0.0f,+0.0f);
1576
    roundCorners(mesh,center,vertices,0.06f,0.10f);
1577
*/
1578
    mesh.mergeEffComponents();
1579

  
1524 1580
    return mesh;
1525 1581
    }
1526 1582
  }

Also available in: Unified diff