Project

General

Profile

« Previous | Next » 

Revision f9464035

Added by Leszek Koltunski almost 4 years ago

Improve the Ivy mesh.

View differences:

src/main/java/org/distorted/dialogs/RubikDialogNewRecord.java
32 32
import android.view.LayoutInflater;
33 33
import android.view.View;
34 34
import android.view.Window;
35
import android.view.WindowManager;
36 35
import android.widget.Button;
37 36
import android.widget.TextView;
38 37

  
src/main/java/org/distorted/objects/FactoryCubit.java
527 527
      vertices[2*i+7] = (CORR*(sin-0.5f)-IVY_M)*IVY_C;
528 528
      }
529 529

  
530
    float[] bands0 = computeBands(+0.01f,12,0.2f,0.5f,5);
531
    float[] bands1 = computeBands(-0.10f,20,0.2f,0.0f,2);
530
    float[] bands0 = computeBands(+0.012f,20,0.2f,0.5f,7);
531
    float[] bands1 = computeBands(-0.100f,20,0.2f,0.0f,2);
532 532

  
533 533
    meshes[0] = new MeshPolygon(vertices,bands0,1,2);
534 534
    meshes[0].setEffectAssociation(0,1,0);
......
1266 1266
    for( VertexEffect effect : effects ) mesh.apply(effect);
1267 1267

  
1268 1268
    Static3D center = new Static3D(-0.5f,-0.5f,-0.5f);
1269
    Static3D[] vertices = new Static3D[1];
1269
    Static3D[] vertices = new Static3D[4];
1270 1270
    vertices[0] = new Static3D(+0.0f,+0.0f,+0.0f);
1271
    roundCorners(mesh,center,vertices,0.06f,0.15f);
1271
    vertices[1] = new Static3D(-1.0f,+0.0f,+0.0f);
1272
    vertices[2] = new Static3D(+0.0f,-1.0f,+0.0f);
1273
    vertices[3] = new Static3D(+0.0f,+0.0f,-1.0f);
1274

  
1275
    roundCorners(mesh,center,vertices,0.03f,0.10f);
1272 1276

  
1273 1277
    mesh.mergeEffComponents();
1274 1278

  
......
1281 1285
    {
1282 1286
    MeshBase mesh = createFacesIvyFace();
1283 1287

  
1288
    Static3D center = new Static3D(-0.0f,-0.0f,-0.5f);
1289
    Static3D[] vertices = new Static3D[2];
1290
    vertices[0] = new Static3D(-0.5f,+0.5f,+0.0f);
1291
    vertices[1] = new Static3D(+0.5f,-0.5f,+0.0f);
1292

  
1293
    roundCorners(mesh,center,vertices,0.03f,0.10f);
1294

  
1284 1295
    mesh.mergeEffComponents();
1285 1296
    mesh.addEmptyTexComponent();
1286 1297
    mesh.addEmptyTexComponent();

Also available in: Unified diff