Project

General

Profile

« Previous | Next » 

Revision 16663e27

Added by Leszek Koltunski about 2 years ago

Bandaged: generalize the FactoryBandagedCubit to be able to create bandaged cubits of any cuboid NxMxK where 1<=N,M,K<=5.

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java
398 398
         }
399 399

  
400 400
     TwistyBandagedGeneric.setPositions(pos);
401
     TwistyObject obj = new TwistyBandagedGeneric( new Static4D(0,0,0,1), 1.0f, TwistyObject.MODE_NORM);
401
     TwistyObject obj = new TwistyBandagedGeneric( new int[] {3,3,3}, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
402
                                                   new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, null );
402 403
     String name = obj.getShortName();
403 404
     BandagedCreatorActivity act = (BandagedCreatorActivity) mView.getContext();
404 405

  
......
474 475
     final int FBO_HEIGHT = (int)(R*360);
475 476
     final float OBJECT_SIZE = R*0.38f;
476 477

  
477
     TwistyObject object = new TwistyBandagedGeneric(ShapeHexahedron.DEFAULT_ROT, OBJECT_SIZE, TwistyObject.MODE_ICON);
478
     DistortedEffects effects = object.getObjectEffects();
479
     DistortedNode node = object.getNode();
478
     TwistyObject obj = new TwistyBandagedGeneric( new int[] {3,3,3}, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
479
                                                   ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, null );
480

  
481
     DistortedEffects effects = obj.getObjectEffects();
482
     DistortedNode node = obj.getNode();
480 483

  
481 484
     if( mFramebuffer==null )
482 485
       {
......
493 496
     border.setHaloDepth(false);
494 497
     effects.apply(border);
495 498

  
496
     final String name = object.getShortName()+".png";
499
     final String name = obj.getShortName()+".png";
497 500
     File file = new File(act.getFilesDir(), name);
498 501
     String filename = file.getAbsolutePath();
499 502

  

Also available in: Unified diff