keyframes-to-dual-quats
Convert a set of keyframed joint matrix arrays into joint dual quaternion arrays
Background / Initial Motivation
This module was made to help with dual quaternion linear blending when using collada-dae-parser
To Install
$ npm install --save keyframes-to-dual-quats
Usage
var keyframesToDualQuats = var keyframeMatrices = 1: 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 "3.66": // ... some matrices console// {// 1: [// [0, 0, 0, 1, 0, 0, 0, 0]// ],// "3.66": [// // ... some dual quaternions// ]// }
// With collada-dae-parservar my3dModel = fs // Now your keyframes are dual quaternions which you can use for dual quaternion linear blendingmy3dModelkeyframes =
See Also
References
- http://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf
- 4x4 matrix to dual quaternion formula is in Section 7.1.6
License
MIT