Fix conversion to right-handed matrix in Collada writer.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5711 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
39bf558a78
commit
c504e7d598
|
@ -2199,13 +2199,14 @@ void CColladaMeshWriter::writeLookAtElement(const irr::core::vector3df& eyePos,
|
|||
|
||||
void CColladaMeshWriter::writeMatrixElement(const irr::core::matrix4& matrixIrr)
|
||||
{
|
||||
irr::core::matrix4 matrix(matrixIrr.getTransposed());
|
||||
irr::core::matrix4 matrix(matrixIrr.getTransposed()); // transposed because row/lines are written other way round in Collada
|
||||
// Convert to right-handed
|
||||
matrix[2] *= -1.f;
|
||||
matrix[6] *= -1.f;
|
||||
matrix[8] *= -1.f;
|
||||
matrix[9] *= -1.f;
|
||||
matrix[11] *= -1.f;
|
||||
|
||||
matrix[14] *= -1.f;
|
||||
|
||||
Writer->writeElement("matrix", false);
|
||||
Writer->writeLineBreak();
|
||||
|
|
Loading…
Reference in New Issue