import torch


def transform_point_cloud(x1, R, t):
    """
    Transforms the point cloud using the giver transformation paramaters
    
    Args:
        x1  (np array): points of the point cloud [b,n,3]
        R   (np array): estimated rotation matrice [b,3,3]
        t   (np array): estimated translation vectors [b,3,1]
    Returns:
        x1_t (np array): points of the transformed point clouds [b,n,3]
    """
    x1_t = (torch.matmul(R, x1.transpose(0,2,1)) + t).transpose(0,2,1)

    return x1_t