Project

General

Profile

« Previous | Next » 

Revision b4a6e84d

Added by Leszek Koltunski over 2 years ago

Make the 4 built-in BandagedCuboids use the introduced InitData concept and remove all specific bandaged object classes.

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java
19 19

  
20 20
package org.distorted.bandaged;
21 21

  
22
import java.io.File;
23
import java.io.FileNotFoundException;
24
import java.io.IOException;
25
import java.nio.ByteBuffer;
26
import java.nio.ByteOrder;
27

  
22 28
import javax.microedition.khronos.egl.EGLConfig;
23 29
import javax.microedition.khronos.opengles.GL10;
24 30

  
......
36 42
import org.distorted.library.main.DistortedLibrary;
37 43
import org.distorted.library.main.DistortedNode;
38 44
import org.distorted.library.main.DistortedScreen;
39

  
40 45
import org.distorted.library.main.InternalOutputSurface;
41 46
import org.distorted.library.mesh.MeshBase;
42 47
import org.distorted.library.type.Static1D;
......
46 51
import org.distorted.objectlib.main.InitData;
47 52
import org.distorted.objectlib.main.ShapeHexahedron;
48 53
import org.distorted.objectlib.main.TwistyObject;
49
import org.distorted.objectlib.objects.TwistyBandagedGeneric;
54
import org.distorted.objectlib.objects.TwistyBandagedCuboid;
50 55
import org.json.JSONException;
51 56

  
52
import java.io.File;
53
import java.io.FileNotFoundException;
54
import java.io.IOException;
55
import java.nio.ByteBuffer;
56
import java.nio.ByteOrder;
57

  
58 57
///////////////////////////////////////////////////////////////////////////////////////////////////
59 58

  
60 59
public class BandagedCreatorRenderer implements GLSurfaceView.Renderer, DistortedLibrary.ExceptionListener
......
431 430
         }
432 431

  
433 432
     InitData data = new InitData(mObjSize,pos);
434
     TwistyObject obj = new TwistyBandagedGeneric( data, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
435
                                                   new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, null );
433
     TwistyObject obj = new TwistyBandagedCuboid( data, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
434
                                                  new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, null );
436 435
     String name = obj.getShortName();
437 436
     BandagedCreatorActivity act = (BandagedCreatorActivity) mView.getContext();
438 437

  
......
527 526
     final int FBO_HEIGHT = (int)(R*1280);
528 527
     final float OBJECT_SIZE = R*0.35f;
529 528

  
530
     TwistyObject obj = new TwistyBandagedGeneric( data, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
531
                                                   ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, null );
529
     TwistyObject obj = new TwistyBandagedCuboid( data, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
530
                                                  ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, null );
532 531

  
533 532
     DistortedEffects effects = obj.getObjectEffects();
534 533
     DistortedNode node = obj.getNode();

Also available in: Unified diff