Forgive me if this has been answered and I wasn't able to find it.
We are trying to incorporate an existing C++ game into a vuforia app. The game already handles all of its own graphics primitives, so what we really need to do is pass the camera info into the existing renderer and let it do its thing. I realize that this is duplicating work that vuforia does, but the quickest and most portable path is to handle it this way.
The existing game world wants to get the camera info in the following form:
- pos - x, y, z position of camera with center of trackable as origin
- front - vector of camera lens orientation
- up - vector which passes bottom to top through the camera orthogonal to front
We are getting the camera position correctly from the trackable pose data, but are having difficulties mapping from the rotation matrix (upper left 3x3) of the pose data to the desired front and up vectors.
The world coordinates are x rightward, y outward, z upward. My understanding is that vurforia pose data is x rightward, y downward, z inward.
Do we need to do some matrix transformations, or can we just map the vectors appropriately, remapping axes and flipping signs as needed?
Fairly urgent request. Help greatly appreciated.