def render(self, show_labels, scene_pointcloud_file_path=None):
    delta_rotate_angle = 0.5
    if (scene_pointcloud_file_path is not None):
        print('start reading floor and wall...')
        self.splitLabeledPoints(scene_pointcloud_file_path)
    rendered_pointcloud = o3d.geometry.PointCloud()
    render_points = []
    render_colors = []
    print('start create rendered pointcloud...')
    for i in tqdm(range(len(self.pointcloud_list))):
        points = np.asarray(self.pointcloud_list[i].points).tolist()
        if (len(points) == 0):
            continue
        for point in points:
            render_points.append(point)
            render_colors.append((self.d3_40_colors_rgb[(i % len(self.d3_40_colors_rgb))] / 255.0))
    if (scene_pointcloud_file_path is not None):
        print('start create rendered floor...')
        for wall_point in tqdm(self.labeled_point_cluster_list[0]):
            if (abs(wall_point[2]) > 0.01):
                continue
            render_points.append(wall_point)
            render_colors.append((np.array([132, 133, 135], dtype=np.uint8) / 255.0))
    rendered_pointcloud.points = o3d.utility.Vector3dVector(np.array(render_points))
    rendered_pointcloud.colors = o3d.utility.Vector3dVector(np.array(render_colors))
    rendered_pointcloud.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
    self.render_center = rendered_pointcloud.get_axis_aligned_bounding_box().get_center()
    self.vis.create_window(window_name='Open3D RenderObject')
    render_option = self.vis.get_render_option()
    render_option.background_color = np.array([1, 1, 1])
    render_option.point_size = 1
    self.vis.add_geometry(rendered_pointcloud)
    while True:
        self.rotateVis(delta_rotate_angle)
        self.vis.poll_events()
        self.vis.update_renderer()
        if (ord('q') == cv2.waitKey(1)):
            break
    self.vis.destroy_window()
    return True
def render(self, show_labels, scene_pointcloud_file_path=None):
    delta_rotate_angle = 0.5
    if (scene_pointcloud_file_path is not None):
        print('start reading floor and wall...')
        self.splitLabeledPoints(scene_pointcloud_file_path)
    rendered_pointcloud = o3d.geometry.PointCloud()
    render_points = []
    render_colors = []
    print('start create rendered pointcloud...')
    for i in tqdm(range(len(self.pointcloud_list))):
        points = np.asarray(self.pointcloud_list[i].points).tolist()
        if (len(points) == 0):
            continue
        for point in points:
            render_points.append(point)
            render_colors.append((self.d3_40_colors_rgb[(i % len(self.d3_40_colors_rgb))] / 255.0))
    if (scene_pointcloud_file_path is not None):
        print('start create rendered floor...')
        for wall_point in tqdm(self.labeled_point_cluster_list[0]):
            if (abs(wall_point[2]) > 0.01):
                continue
            render_points.append(wall_point)
            render_colors.append((np.array([132, 133, 135], dtype=np.uint8) / 255.0))
    rendered_pointcloud.points = o3d.utility.Vector3dVector(np.array(render_points))
    rendered_pointcloud.colors = o3d.utility.Vector3dVector(np.array(render_colors))
    rendered_pointcloud.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamHybrid(radius=0.1, max_nn=30))
    self.render_center = rendered_pointcloud.get_axis_aligned_bounding_box().get_center()
    self.vis.create_window(window_name='Open3D RenderObject')
    render_option = self.vis.get_render_option()
    render_option.background_color = np.array([1, 1, 1])
    render_option.point_size = 1
    self.vis.add_geometry(rendered_pointcloud)
    while True:
        self.rotateVis(delta_rotate_angle)
        self.vis.poll_events()
        self.vis.update_renderer()
        if (ord('q') == cv2.waitKey(1)):
            break
    self.vis.destroy_window()
    return True