MCPcopy Create free account
hub / github.com/OpenMeshLab/MeshXL / rotate_pc_along_y

Function rotate_pc_along_y

utils/pc_util.py:90–98  ·  view source on GitHub ↗

Input ps is NxC points with first 3 channels as XYZ z is facing forward, x is left ward, y is downward

(pc, rot_angle)

Source from the content-addressed store, hash-verified

88
89
90def rotate_pc_along_y(pc, rot_angle):
91 """Input ps is NxC points with first 3 channels as XYZ
92 z is facing forward, x is left ward, y is downward
93 """
94 cosval = np.cos(rot_angle)
95 sinval = np.sin(rot_angle)
96 rotmat = np.array([[cosval, -sinval], [sinval, cosval]])
97 pc[:, [0, 2]] = np.dot(pc[:, [0, 2]], np.transpose(rotmat))
98 return pc
99
100
101def roty(t):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected