You could try the following. It will use the camera/object matrix as is, but then swap z and y, as well as multiply the new y with -1. The first matrix does this job (which is applied last). We then multiply it with the original matrix using ConcatTransform.
- Code: Select all
outputstream << "Transform [" <<
" 1.0 0.0 0.0 0.0 " <<
" 0.0 0.0 1.0 0.0 " <<
" 0.0 -1.0 0.0 0.0 " <<
" 0.0 0.0 0.0 1.0]" << std::endl;
outputstream << "ConcatTransform [" <<
m[0][0] << " " << m[1][0] << " " << m[2][0] << " 0.0 " <<
m[0][1] << " " << m[1][1] << " " << m[2][1] << " 0.0 " <<
m[0][2] << " " << m[1][2] << " " << m[2][2] << " 0.0 " <<
m[0][3] << " " << m[1][3] << " " << m[2][3] << " 1.0]" << std::endl;
You might want to play with the sign there, either removing it or putting it on the other 1 instead (the one on the row above and to the right).
If this works then you'll need to do this for all objects you export.
