该函数用于获取绕Z、X、Y轴旋转的旋转矩阵。
import open3d as o3d
import numpy as np
z = np.pi # 绕Z轴旋转180度,相当于翻转
x, y = 0, 0 # 在XY平面内不做旋转
rotation_matrix = o3d.geometry.HalfEdgeTriangleMesh.get_rotation_matrix_from_zxy(z, x, y)
print(rotation_matrix)
输出结果为:
[[-1.0000000e+00 1.2246468e-16 0.0000000e+00]
[-1.2246468e-16 -1.0000000e+00 0.0000000e+00]
[ 0.0000000e+00 0.0000000e+00 1.0000000e+00]]