def rotate_point_cloud_with_normal(batch_xyz_normal):
    """Randomly rotate XYZ, normal point cloud.
    Input:
        batch_xyz_normal: B,N,6, first three channels are XYZ, last 3 all normal
    Output:
        B,N,6, rotated XYZ, normal point cloud
    """
    for k in range(batch_xyz_normal.shape[0]):
        rotation_angle = np.random.uniform() * 2 * np.pi
        cosval = np.cos(rotation_angle)
        sinval = np.sin(rotation_angle)
        rotation_matrix = np.array(
            [[cosval, 0, sinval], [0, 1, 0], [-sinval, 0, cosval]]
        )
        shape_pc = batch_xyz_normal[k, :, 0:3]
        shape_normal = batch_xyz_normal[k, :, 3:6]
        batch_xyz_normal[k, :, 0:3] = np.dot(
            shape_pc.reshape((-1, 3)), rotation_matrix
        )
        batch_xyz_normal[k, :, 3:6] = np.dot(
            shape_normal.reshape((-1, 3)), rotation_matrix
        )
    return batch_xyz_normal
Randomly rotate XYZ, normal point cloud.
    Input:
        batch_xyz_normal: B,N,6, first three channels are XYZ, last 3 all normal
    Output:
        B,N,6, rotated XYZ, normal point cloud
    
examples/pytorch/pointcloud/pct/provider.py