ui: move INF_POINT to constant (#36470)

move INF_POINT to constant
This commit is contained in:
Dean Lee
2025-10-25 13:00:45 +08:00
committed by GitHub
parent fa373af9b5
commit 2beb0ffad1
+2 -2
View File
@@ -27,6 +27,7 @@ BORDER_COLORS = {
WIDE_CAM_MAX_SPEED = 10.0 # m/s (22 mph)
ROAD_CAM_MIN_SPEED = 15.0 # m/s (34 mph)
INF_POINT = np.array([1000.0, 0.0, 0.0])
class AugmentedRoadView(CameraView):
@@ -176,9 +177,8 @@ class AugmentedRoadView(CameraView):
zoom = 2.0 if is_wide_camera else 1.1
# Calculate transforms for vanishing point
inf_point = np.array([1000.0, 0.0, 0.0])
calib_transform = intrinsic @ calibration
kep = calib_transform @ inf_point
kep = calib_transform @ INF_POINT
# Calculate center points and dimensions
x, y = self._content_rect.x, self._content_rect.y