Skip to content

Commit

Permalink
faster_rendering (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaloi authored Nov 21, 2024
1 parent cbeccfc commit 4f318fe
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions waymax/visualization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,10 @@ def plot_numpy_bounding_boxes(
cr = pt + width / 2 * ut
cf = pt + length / 2 * u

# Draw bboxes.
# Draw bboxes and heading arrow.
ax.plot(
[tl[0, :], tr[0, :], br[0, :], bl[0, :], tl[0, :]],
[tl[1, :], tr[1, :], br[1, :], bl[1, :], tl[1, :]],
color=color,
zorder=4,
alpha=alpha,
label=label,
)

# Draw heading arrow.
ax.plot(
[cl[0, :], cr[0, :], cf[0, :], cl[0, :]],
[cl[1, :], cr[1, :], cf[1, :], cl[1, :]],
[tl[0, :], tr[0, :], br[0, :], bl[0, :], tl[0, :], cl[0, :], cr[0, :], cf[0, :], cl[0, :]],
[tl[1, :], tr[1, :], br[1, :], bl[1, :], tl[1, :], cl[1, :], cr[1, :], cf[1, :], cl[1, :]],
color=color,
zorder=4,
alpha=alpha,
Expand Down

0 comments on commit 4f318fe

Please sign in to comment.