F
F
ForhaxeD2014-11-29 15:49:08
Mathematics
ForhaxeD, 2014-11-29 15:49:08

What to do with a quaternion when changing the basis?

Hello %user%.
There is a problem, I'm setting up the export of geometry from Unity3D to a self-written engine built on the basis of XNA / DirectX.
And the fact is that in Unity3D the space basis is (conditionally): vec3(1, 1, 1) , and in XNADirectX it is vec3(-1,1,1) (relative to Unity3D).
When transferring geometry, it is enough to take into account (locally for each model) -
newVec3 = vertexVec3 * vec3(-1, 1, 1);
With the transformation, of course, we multiply the position and size by vec3(-1, 1,1). But the transformation of both me and the unit is stored in the form of SRT (2 vectors per size and per position and 1 quaternion). So, how to change the basis of the quaternion in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mrrl, 2014-11-29
@ForhaxeD

The quaternion will change the axis of rotation (it will be reflected symmetrically) and the direction of rotation. Thus, the quaternion (x,y,z,w) will go to (-x,y,z,-w).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question