def render_bounding_box_3d(
        self,
        boxes3d,
        extrinsics=Pose(),
        colors=(GREEN, ),
        side_color_fraction=0.7,
        rear_color_fraction=0.5,
        texts=None,
        line_thickness=3,
        font_scale=0.5,
    ):
        """Render bounding box 3d in BEV perspective.

        Parameters
        ----------
        bboxes3d: GenericBoxes3D
            3D annotations in the sensor coordinate frame.

        extrinsics: Pose, default: Identity pose
            The pose of the pointcloud sensor wrt the body frame (Sensor frame -> (Vehicle) Body frame).

        colors: List of RGB tuple, default: [GREEN,]
            Draw boxes using this color.

        side_color_fraction: float, default: 0.6
            A fraction in brightness of side edge colors of bounding box wrt the front face.

        rear_color_fraction: float, default: 0.3
            A fraction in brightness of rear face colors of bounding box wrt the front face.

        texts: list of str, default: None
            3D annotation category name.

        line_thickness: int, default: 2
            Thickness of lines

        font_scale: float, default: 0.5
            Font scale used for text labels.
        """
        if len(colors) == 1:
            colors = list(colors) * len(boxes3d)

        combined_transform = self._bev_rotation * extrinsics

        boxes_corners = boxes3d.corners.cpu().numpy()

        # Draw cuboids
        for bidx, (corners, color) in enumerate(zip(boxes_corners, colors)):
            # Create 3 versions of colors for face coding.
            front_face_color = color
            side_line_color = [int(side_color_fraction * c) for c in color]
            rear_face_color = [int(rear_color_fraction * c) for c in color]

            # Do orthogonal projection and bring into pixel coordinate space
            # corners = bbox.corners
            corners_in_bev = combined_transform * corners
            corners2d = corners_in_bev[[0, 1, 5, 4], :2]  # top surface of cuboid

            # Compute the center and offset of the corners
            corners2d[:, 0] = (self._center_pixel[0] + corners2d[:, 0] * self._pixels_per_meter)
            corners2d[:, 1] = (self._center_pixel[1] + corners2d[:, 1] * self._pixels_per_meter)

            center = np.mean(corners2d, axis=0).astype(np.int32)
            corners2d = corners2d.astype(np.int32)

            # Draw a line connecting center and font side.
            clr = WHITE if np.mean(self._bg_clr) < 128. else DARKGRAY
            cv2.line(
                self.data, tuple(center), (
                    (corners2d[0][0] + corners2d[1][0]) // 2,
                    (corners2d[0][1] + corners2d[1][1]) // 2,
                ), clr, 2
            )

            # Draw front face, side faces and back face
            cv2.line(self.data, tuple(corners2d[0]), tuple(corners2d[1]), front_face_color, line_thickness)
            cv2.line(self.data, tuple(corners2d[1]), tuple(corners2d[2]), side_line_color, line_thickness)
            cv2.line(self.data, tuple(corners2d[2]), tuple(corners2d[3]), rear_face_color, line_thickness)
            cv2.line(self.data, tuple(corners2d[3]), tuple(corners2d[0]), side_line_color, line_thickness)

            if texts:
                top_left = np.argmin(np.linalg.norm(corners2d, axis=1))
                cv2.putText(
                    self.data, texts[bidx], tuple(corners2d[top_left]), cv2.FONT_HERSHEY_SIMPLEX, font_scale, WHITE,
                    line_thickness // 2, cv2.LINE_AA
                )
Render bounding box 3d in BEV perspective.

        Parameters
        ----------
        bboxes3d: GenericBoxes3D
            3D annotations in the sensor coordinate frame.

        extrinsics: Pose, default: Identity pose
            The pose of the pointcloud sensor wrt the body frame (Sensor frame -> (Vehicle) Body frame).

        colors: List of RGB tuple, default: [GREEN,]
            Draw boxes using this color.

        side_color_fraction: float, default: 0.6
            A fraction in brightness of side edge colors of bounding box wrt the front face.

        rear_color_fraction: float, default: 0.3
            A fraction in brightness of rear face colors of bounding box wrt the front face.

        texts: list of str, default: None
            3D annotation category name.

        line_thickness: int, default: 2
            Thickness of lines

        font_scale: float, default: 0.5
            Font scale used for text labels.
        
tridet/visualizers/bev.py