Quat constructor question - little help!


#1

Just a quick question on Quats - does anyone know how I can construct a Quat in JS using x,y,z,w values? I have the values ready and I think it holds the solution for my joint rotation problem described here. I’ve tried the obvious:

var quat = new Quat(x,y,z,w);

but no luck…

(Background: The problem seems to be that I’m currently applying Euler rotations instead of final angles when importing bvh data, i.e. I’ve not been taking into account rotation order of the bvh file rotations. I got the clue from reading this. I’ve found a way to convert the Euler rotations using JS objects taken from the THREE.js library, but I now need a way to convert a THREE.js quaternion to a HiFi one, hence the question)

  • davedub

#2

var quat = { x: xValue, y: yValue, z: zValue, w: wValue };


#3

o.o