Page 1 of 1

Loading a .X file

Posted: Sat Dec 11, 2004 1:16 am
by Syphonix
I'm having some troubles loading a .X file.

If I have an IAnimatedMeshX file, what would I set it equal to? getMesh()? I tried getMesh(), but the compiler tells me that I need to typecast. What function would I use?

Posted: Sat Dec 11, 2004 9:25 am
by bal
An IAnimatedMesh and IAnimatedMeshSceneNode work fine.

Posted: Sat Dec 11, 2004 2:03 pm
by Syphonix
I know that. But how would I access the IAnimatedMeshX methods from an IAnimatedMesh? Such as setCurrentAnimation(), etc. That is what I am interested in doing.

Posted: Wed Nov 16, 2005 6:50 am
by Ed
May be as say Electron

code:
--------------------------------------------------------------------------------

IAnimatedMeshX* mesh=(IAnimatedMeshX*)smgr->getMesh("filename.x");
mesh->setCurrentAnimation(animIdx);

--------------------------------------------------------------------------------