def convert_transform2numpy(transform: Transform) -> np.ndarray: """ Get a numpy array containing the same transformation matrix values as a Mitsuba Transform object :param transform: Mitsuba Transform :return: 4x4 Numpy array representing the transformation matrix """ matrix = np.zeros([4, 4], dtype=float) for i in range(4): for j in range(4): matrix[i, j] = transform.getMatrix()[i, j] return matrix