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/DistortedCubes.java
103 103
   initializeData();
104 104
   }
105 105

  
106
///////////////////////////////////////////////////////////////////////////////////////////////////
107
/**
108
 * Creates internal memory representation of a full, hole-less cuboid subset.
109
 *
110
 * @param cols Number of columns
111
 * @param rows Number of rows
112
 * @param cubeSize size, in pixels, of the single 1x1x1 cube our cuboid is built from
113
 * @param frontOnly Only create the front wall or side and back as well?
114
 */
115
 public DistortedCubes(int cols, int rows, int cubeSize, boolean frontOnly)
116
   {
117
   mSizeX= cubeSize*cols;
118
   mSizeY= cubeSize*rows;
119
   mSizeZ= frontOnly ? 1 : cubeSize;
120
   mGrid = DistortedGridFactory.getGrid(cols,rows, frontOnly);
121
   initializeData();
122
   }
123

  
106 124
///////////////////////////////////////////////////////////////////////////////////////////////////
107 125
/**
108 126
 * Convenience constructor.

Also available in: Unified diff