Skip to content

Commit

Permalink
Remove wall arrow until we introduce proper orientation
Browse files Browse the repository at this point in the history
  • Loading branch information
kwvanderlinde committed Nov 16, 2024
1 parent 117cb89 commit 446539c
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -339,25 +339,6 @@ public void paint(Graphics2D g2) {
shape.moveTo(from.getX(), from.getY());
shape.lineTo(to.getX(), to.getY());

if (from.distance(to) > 4 * handleRadius) {
// Draw a fun little arrow indicating the wall direection.
// theta increases clockwise.
var theta = Math.atan2(to.getY() - from.getY(), to.getX() - from.getX());
var arrowSize = handleRadius;
var vertex =
new Point2D.Double(
to.getX() - 4 * handleRadius * Math.cos(theta),
to.getY() - 4 * handleRadius * Math.sin(theta));
shape.moveTo(vertex.getX(), vertex.getY());
shape.lineTo(
vertex.getX() - arrowSize * Math.cos(theta - Math.PI / 4),
vertex.getY() - arrowSize * Math.sin(theta - Math.PI / 4));
shape.moveTo(vertex.getX(), vertex.getY());
shape.lineTo(
vertex.getX() - arrowSize * Math.cos(theta + Math.PI / 4),
vertex.getY() - arrowSize * Math.sin(theta + Math.PI / 4));
}

g2.setStroke(wallOutlineStroke);
g2.setPaint(wallOutlineColor);
g2.draw(shape);
Expand Down

0 comments on commit 446539c

Please sign in to comment.