MCPcopy Index your code
hub / github.com/MotrixLab/MotionDiffuse / qbetween_np

Function qbetween_np

text2motion/utils/quaternion.py:400–409  ·  view source on GitHub ↗

find the quaternion used to rotate v0 to v1

(v0, v1)

Source from the content-addressed store, hash-verified

398
399
400def qbetween_np(v0, v1):
401 '''
402 find the quaternion used to rotate v0 to v1
403 '''
404 assert v0.shape[-1] == 3, 'v0 must be of the shape (*, 3)'
405 assert v1.shape[-1] == 3, 'v1 must be of the shape (*, 3)'
406
407 v0 = torch.from_numpy(v0).float()
408 v1 = torch.from_numpy(v1).float()
409 return qbetween(v0, v1).numpy()
410
411
412def lerp(p0, p1, t):

Callers 2

process_fileFunction · 0.85
inverse_kinematics_npMethod · 0.85

Calls 1

qbetweenFunction · 0.85

Tested by

no test coverage detected