nx_hairdyn_transport_candidate_t284.nx source
↩ module page · 12 lines · 568 B
1// Displacement vectors omit dual-quaternion translation by construction.
2// Input q is the normalized real rotation used for this guide's skinning.
3// Caller retains the same posed frame and scale for both vectors.
4// No allocation and no second quaternion implementation.
5import "nx_vecmath.nx"
6func hd_posed_delta_to_bind(out:*i64,q:*i64,posed_delta:*i64,conjugate:*i64)->i64 {
7 vm_q_conj(conjugate,q)
8 return vm_q_rotate_v3(out,conjugate,posed_delta)
9}
10func hd_bind_delta_to_posed(out:*i64,q:*i64,bind_delta:*i64)->i64 {
11 return vm_q_rotate_v3(out,q,bind_delta)
12}