does MeshMS3D&MeshX format support in irrlicht 1.4 remov

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
nor
Posts: 7
Joined: Mon Jan 29, 2007 2:43 am

does MeshMS3D&MeshX format support in irrlicht 1.4 remov

Post by nor »

i could't find IAnimatedMeshMS3D and IAnimatedMeshX in irrlicht 1.4.1 header,does it mean irrlicht don't support these format in this version?please help,thanks~
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

See ISkinnedMesh

1.4 has a new animation system which has reduced the requirement for seperate files for the different animated model formats.
Image Image Image
nor
Posts: 7
Joined: Mon Jan 29, 2007 2:43 am

Post by nor »

hi jp,i'm finding the details to fix the example irrlicht_phsyx for the new version both in irrlicht and phsyx,there is the code:

Code: Select all

void CPhysXAnimatedMeshSceneNode::OnPostRender(u32 timeMs)
{
	s32 frameNr = getFrameNr();

	if (IsVisible)
	{
		// animate this node with all animators

		core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
		for (; ait != Animators.end(); ++ait)
			(*ait)->animateNode(this, timeMs);

		// update absolute position
		updateAbsolutePosition();

		// update all dummy transformation nodes
		if (!JointChildSceneNodes.empty() && Mesh
			&& (Mesh->getMeshType() == EAMT_MS3D || Mesh->getMeshType() == EAMT_X))
		{
			
			IAnimatedMeshMS3D* amm = (IAnimatedMeshMS3D*)Mesh;
			core::matrix4* mat;

			for (s32 i=0; i<(s32)JointChildSceneNodes.size(); ++i)
				if (JointChildSceneNodes[i])
				{
					mat = amm->getMatrixOfJoint(i, frameNr);
					if (mat)
						JointChildSceneNodes[i]->getRelativeTransformationMatrix() = *mat;
				}
		}

		core::list<ISceneNode*>::Iterator it = Children.begin();
		for (; it != Children.end(); ++it)
			(*it)->OnAnimate(timeMs);
	}
}
below "update all dummy transformation nodes" is the problem to fix for the new irrlicht version,i tried to convert the type IAnimatedMeshMS3D to ISkinnedMesh but it doesn't work,i also couldn't find "getMatrixOfJoint" method,thanks for your help.
my english is poor ,forgive me:P
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

How does it not work if you cast to ISkinnedMesh? Compile error? Crash?

getMatrixOfJoint may not exist anymore in any particular form but if you look in IAnimatedMeshSceneNode in the API/docs then you can grab the required IBoneSceneNode and then grab its absolute transformation matrix, which i guess is probably the same thing.

So in that case it seems like you don't need the mesh at all... because you're working with an implementation of IAnimatedMeshSceneNode you can just call getJointNode(i);
Image Image Image
Post Reply