Project

General

Profile

« Previous | Next » 

Revision acb2aaae

Added by Leszek Koltunski almost 2 years ago

Major change in JSOn file format:

replace the old (corners,centers) system with a list of VertexEffects which are applied to each cubit variant.

View differences:

src/main/java/org/distorted/examples/meshfile/MeshFileRenderer.java
46 46
import org.distorted.objectlib.helpers.FactoryCubit;
47 47
import org.distorted.objectlib.helpers.ObjectFaceShape;
48 48
import org.distorted.objectlib.helpers.ObjectShape;
49
import org.distorted.objectlib.helpers.ObjectVertexEffects;
49 50
import org.distorted.objectlib.main.InitData;
50 51
import org.distorted.objectlib.main.TwistyObject;
51 52
import org.distorted.objectlib.objects.*;
......
299 300
      InitData data = new InitData(new int[] {2,3,2});
300 301
      TwistyObject puzzle = new TwistyCuboid(data,MESH_NICE,MODE_NORM,quat,move,scale,null);
301 302

  
302
      ObjectShape shape   = puzzle.getObjectShape(variant);
303
      ObjectFaceShape face= puzzle.getObjectFaceShape(variant);
303
      ObjectShape shape           = puzzle.getObjectShape(variant);
304
      ObjectFaceShape face        = puzzle.getObjectFaceShape(variant);
305
      ObjectVertexEffects effects = puzzle.getVertexEffects(variant);
304 306

  
305 307
      int[][] indices = shape.getVertIndices();
306 308
      int numComponents = indices.length;
......
309 311
      FactoryCubit factory = FactoryCubit.getInstance();
310 312
      factory.clear();
311 313
      factory.createNewFaceTransform(shape,outer);
312
      mMesh = factory.createRoundedSolid(shape,face,MESH_NICE,numComponents);
314
      mMesh = factory.createRoundedSolid(shape,face,effects,MESH_NICE,numComponents);
313 315

  
314 316
      int numEff = mMesh.getNumEffComponents();
315 317

  

Also available in: Unified diff