Skip to content

Commit

Permalink
Double L-shapes
Browse files Browse the repository at this point in the history
  • Loading branch information
armin-reichert committed Jan 4, 2025
1 parent 602d023 commit c1ec1a1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public enum ObstacleType {
"dcgbfebgce", "dcfbdgbfce", "dgbecgfceb", "dcgfcdbfeb" // 10 segment
),

L_SHAPE_DOUBLE("dcgbecgbfebgcebgce"),

L_SHAPE_DOUBLE_MIRRORED("dcfbdcfbdgbfcdbfce"),

O_SHAPE("dgfe", "dcgfce", "dgbfeb", "dcgbfceb"),

S_SHAPE(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,16 +185,18 @@ public void renderObstacle3D(Group parent, Obstacle obstacle) {
parent.getChildren().add(og);
ObstacleType type = obstacle.computeType();
switch (type) {
case ANY -> addUncategorizedObstacle3D(og, obstacle);
case CROSS_SHAPE -> addCross3D(og, obstacle);
case F_SHAPE -> addFShape3D(og, obstacle);
case H_SHAPE -> addHShape3D(og, obstacle);
case L_SHAPE -> addLShape3D(og, obstacle);
case O_SHAPE -> addOShape3D(og, obstacle);
case S_SHAPE -> addSShape3D(og, obstacle);
case T_SHAPE -> addTShape3D(og, obstacle);
case ANY -> addUncategorizedObstacle3D(og, obstacle);
case CROSS_SHAPE -> addCross3D(og, obstacle);
case F_SHAPE -> addFShape3D(og, obstacle);
case H_SHAPE -> addHShape3D(og, obstacle);
case L_SHAPE -> addLShape3D(og, obstacle);
case L_SHAPE_DOUBLE -> addLShapeDouble(og, obstacle);
case L_SHAPE_DOUBLE_MIRRORED -> addLShapeDoubleMirrored(og, obstacle);
case O_SHAPE -> addOShape3D(og, obstacle);
case S_SHAPE -> addSShape3D(og, obstacle);
case T_SHAPE -> addTShape3D(og, obstacle);
case T_SHAPE_TWO_ROWS -> addTShapeTwoRows3D(og, obstacle);
case U_SHAPE -> addUShape3D(og, obstacle);
case U_SHAPE -> addUShape3D(og, obstacle);
}
}

Expand Down Expand Up @@ -243,6 +245,24 @@ public void addLShape3D(Group parent, Obstacle obstacle) {
addWall(parent, utc[1], corner);
}

public void addLShapeDouble(Group parent, Obstacle obstacle) {
Vector2f[] t = obstacle.cornerCenters(0, 2, 6, 8, 13);
addTowers(parent, t);
addWall(parent, t[0], t[1]);
addWall(parent, t[1], t[4]);
addWall(parent, t[4], t[2]);
addWall(parent, t[2], t[3]);
}

public void addLShapeDoubleMirrored(Group parent, Obstacle obstacle) {
Vector2f[] t = obstacle.cornerCenters(0, 4, 8, 11, 15);
addTowers(parent, t);
addWall(parent, t[0], t[4]);
addWall(parent, t[1], t[4]);
addWall(parent, t[1], t[3]);
addWall(parent, t[3], t[2]);
}

public void addFShape3D(Group parent, Obstacle obstacle) {
Vector2f[] utc = obstacle.uTurnCenters();
switch (obstacle.encoding()) {
Expand Down

0 comments on commit c1ec1a1

Please sign in to comment.