}
@Override
public List<StructurePiece> getNextPieces() {
final List<StructurePiece> pieces = new ArrayList<StructurePiece>();
final StructurePiece piece = getNextPiece();
piece.setPosition(position.add(rotate(1, -2, 11)));
piece.setRotation(rotation);
piece.randomize();
pieces.add(piece);
if (nextComponentRightLow) {
final StructurePiece next = getNextPiece();
next.setPosition(position.add(rotate(-4, 0, 0)));
next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
next.randomize();
pieces.add(next);
}
if (nextComponentRightHigh) {
final StructurePiece next = getNextPiece();
next.setPosition(position.add(rotate(-4, 2, 6)));
next.setRotation(Quaternionf.fromAngleDegAxis(-90, 0, 1, 0).mul(rotation));
next.randomize();
pieces.add(next);
}
if (nextComponentLeftLow) {
final StructurePiece next = getNextPiece();
next.setPosition(position.add(rotate(7, 0, 4)));
next.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
next.randomize();
pieces.add(next);
}
if (nextComponentLeftHigh) {
final StructurePiece next = getNextPiece();
next.setPosition(position.add(rotate(7, 2, 10)));
next.setRotation(Quaternionf.fromAngleDegAxis(90, 0, 1, 0).mul(rotation));
next.randomize();
pieces.add(next);
}
return pieces;
}