Commit 9f66a1f4 authored by cutealien's avatar cutealien

Distinguish on collada-export between DummyTransformationSceneNode and other...

Distinguish on collada-export between DummyTransformationSceneNode and other nodes and export matrix for the former and position, rotation, scale for the latter. That way we can maybe get rid of the increasing the number of nodes on each import later on.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4274 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ad1775dc
......@@ -647,7 +647,19 @@ void CColladaMeshWriter::writeSceneNode(irr::scene::ISceneNode * node )
Writer->writeElement(L"node", false, L"id", nameId.c_str());
Writer->writeLineBreak();
writeMatrixElement(node->getRelativeTransformation());
if ( node->getType() == ESNT_DUMMY_TRANSFORMATION )
{
writeMatrixElement(node->getRelativeTransformation());
}
else
{
irr::core::vector3df rot(node->getRotation());
writeTranslateElement( node->getPosition() );
writeRotateElement( irr::core::vector3df(1.f, 0.f, 0.f), rot.X );
writeRotateElement( irr::core::vector3df(0.f, 1.f, 0.f), rot.Y );
writeRotateElement( irr::core::vector3df(0.f, 0.f, 1.f), rot.Z );
writeScaleElement( node->getScale() );
}
// instance geometry
IMesh* mesh = getProperties()->getMesh(node);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment