コード例 #1
0
def create_from_scans(mesh, bounding_radius=1, scan_count=100, scan_resolution=400, calculate_normals=True):
    scans = []

    for phi, theta in get_equidistant_camera_angles(scan_count):
        scans.append(Scan(mesh,
            rotation_x=phi,
            rotation_y=theta,
            bounding_radius=bounding_radius,
            resolution=scan_resolution,
            calculate_normals=calculate_normals
        ))

    return SurfacePointCloud(mesh, 
        points=np.concatenate([scan.points for scan in scans], axis=0),
        normals=np.concatenate([scan.normals for scan in scans], axis=0) if calculate_normals else None,
        scans=scans
    )