-class TowerMapping {
- public final float x, y, z;
- public final float[][] cubePositions;
-
- TowerMapping(float x, float y, float z, float[][] cubePositions) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.cubePositions = cubePositions;
- }
-}
-
-public Model buildModel() {
- // The model is represented as an array of towers. The cubes in the tower
- // are represenented relatively. Each tower has an x, y, z reference position,
- // which is typically the base cube's bottom left corner.
- //
- // Following that is an array of floats. A 2-d array contains an x-offset
- // and a z-offset from the reference position. Typically the first cube
- // will just be {0, 0}.
- //
- // A 3-d array contains an x-offset, a z-offset, and a rotation about the
- // y-axis.
- //
- // The cubes automatically increment their y-position by Cube.EDGE_HEIGHT.
- TowerMapping[] mapping = new TowerMapping[] {
-
- new TowerMapping(0, 0, 0, new float[][] {
- {0, 0},
- {5, -10, 20},
- {0, -6},
- {-5, -2, -20},
- }),
-
- new TowerMapping(Cube.EDGE_WIDTH + 2, 0, 0, new float[][] {
- {0, 0},
- {0, 5, 10},
- {0, 2, 20},
- {0, 0, 30},
- }),
-
- // Back Cubes behind DJ platform (in order of increasing x)
- new TowerMapping(50, 5, BASS_DEPTH, new float[][] {
- {0, 0},
- {2, 0, 20},
- {-2, 10},
- {-5, 15, -20},
- {-2, 13},
- }),
-
- new TowerMapping(79, 5, BASS_DEPTH, new float[][] {
- {0, 0},
- {2, 0, 20},
- {4, 10},
- {2, 15, -20},
- {0, 13},
- }),
-
- new TowerMapping(107, 5, BASS_DEPTH, new float[][] {
- {0, 0},
- {4, 0, 20},
- {6, 10},
- {3, 15, -20},
- // {8, 13},
- }),
-
- new TowerMapping(133, 5, BASS_DEPTH, new float[][] {
- {0, 0},
- {-2, 0, 20},
- {0, 10},
- {2, 15, -20},
- // {4, 13}
- }),
-
- new TowerMapping(165, 5, BASS_DEPTH, new float[][] {
- {0, 0},
- {-1, 20},
- {2, 10},
- {-2, 15, -20},
- {3, 13},
- }),
-
- // front DJ cubes
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, 10, new float[][] {
- {0, 0},
- {0, -10, 20},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + Cube.EDGE_HEIGHT, BASS_HEIGHT, 10, new float[][] {
- {3, 0},
- {2, -10, 20},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 2*Cube.EDGE_HEIGHT + 5, BASS_HEIGHT, 10, new float[][] {
- {0, 0},
- {1, 0, 10},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 3*Cube.EDGE_HEIGHT + 9, BASS_HEIGHT, 10, new float[][] {
- {0, 0},
- {-1, 0},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, 10, new float[][] {
- {0, 0},
- {-1, 0},
- }),
-
- // left dj cubes
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
- {0, 0},
- {0, 2, 20},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2, BASS_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
- {0, 0},
- {0, 2, 20},
- }),
-
- // right dj cubes
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, Cube.EDGE_HEIGHT + 2, new float[][] {
- {0, 0},
- {0, 2, 20},
- }),
-
- new TowerMapping((TRAILER_WIDTH - BASS_WIDTH)/2 + 4*Cube.EDGE_HEIGHT + 15, BASS_HEIGHT, 2*Cube.EDGE_HEIGHT + 4, new float[][] {
- {0, 0},
- {0, 2, 20},
- }),