Project

General

Profile

« Previous | Next » 

Revision 665e2c45

Added by Leszek Koltunski over 7 years ago

New constructor to DistortedCubes - easily create a hole-less Cuboid.

View differences:

src/main/java/org/distorted/library/DistortedGridFactory.java
35 35

  
36 36
  static synchronized DistortedObjectGrid getGrid(int cols, String desc, boolean frontOnly)
37 37
    {
38
    String d = desc+("_"+cols+"_"+(frontOnly?"1":"0"));
38
    String d = "1_"+cols+"_"+desc+"_"+(frontOnly?"1":"0");
39 39
    Object o = mGrids.get(d);
40 40

  
41 41
    if( o!=null )
......
50 50
      }
51 51
    }
52 52

  
53
///////////////////////////////////////////////////////////////////////////////////////////////////
54
// DistortedCubesGrid (full)
55

  
56
  static synchronized DistortedObjectGrid getGrid(int cols, int rows, boolean frontOnly)
57
    {
58
    String d = "2_"+cols+"_"+rows+"_"+(frontOnly?"1":"0");
59
    Object o = mGrids.get(d);
60

  
61
    if( o!=null )
62
      {
63
      return (DistortedObjectGrid)o;
64
      }
65
    else
66
      {
67
      DistortedObjectGrid grid = new DistortedCubesGrid(cols,rows,frontOnly);
68
      mGrids.put(d,grid);
69
      return grid;
70
      }
71
    }
72

  
53 73
///////////////////////////////////////////////////////////////////////////////////////////////////
54 74
// DistortedBitmapGrid
55 75

  

Also available in: Unified diff