删除并返回指定索引处的转换矩阵。
pop(index: int) -> open3d.utility.Matrix4d
index
: 索引值,指定要删除的转换矩阵的位置。返回被删除的转换矩阵 open3d.utility.Matrix4d
。
import open3d
# 创建一个转换矩阵向量
matrix_vector = open3d.utility.Matrix4dVector()
matrix_vector.append([1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1])
matrix_vector.append([1,0,0,1],[0,1,0,0],[0,0,1,0],[0,0,0,1])
# 删除并返回第二个转换矩阵
matrix = matrix_vector.pop(1)
print(matrix)
输出:
| 1.0 0.0 0.0 1.0 |
| 0.0 1.0 0.0 0.0 |
| 0.0 0.0 1.0 0.0 |
| 0.0 0.0 0.0 1.0 |
IndexError
: 索引超出范围