def update_point_cloud(visualizer, old_pcloud_geometry, new_pcloud_geometry,
                       bounding_box=None):
    """Update point cloud that has a previous geometry object."""
    if bounding_box:
        pcloud_geometry = new_pcloud_geometry.crop(bounding_box)
    else:
        pcloud_geometry = new_pcloud_geometry

    old_pcloud_geometry.points = pcloud_geometry.points
    old_pcloud_geometry.colors = pcloud_geometry.colors

    return old_pcloud_geometry