Loading a .X file

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
Syphonix
Posts: 25
Joined: Tue Oct 05, 2004 9:00 pm

Loading a .X file

Post 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?
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

An IAnimatedMesh and IAnimatedMeshSceneNode work fine.
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Syphonix
Posts: 25
Joined: Tue Oct 05, 2004 9:00 pm

Post 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.
Ed

Post by Ed »

May be as say Electron

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

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

--------------------------------------------------------------------------------
Post Reply