In 3D Studio Max 8 I created a plane with 50x50 polygons and applied animated noise to it. Then I exported the animation using the Quest3D exporter for .X files .
I loaded it into Irrlicht like this:
________________________________________________
#include <irrlicht.h>
using namespace irr;
#pragma comment(lib,"irrlicht.lib")
int main()
{
IrrlichtDevice *irrdev=createDevice(video::EDT_DIRECT3D9,core::dimension2d<s32>(800,600));
video::IVideoDriver* irrvideodriver=irrdev->getVideoDriver();
scene::ISceneManager* irrsmgr=irrdev->getSceneManager();
irrdev->setWindowCaption(L"Luminance Level Editor");
scene::IAnimatedMesh* mesh= irrsmgr->getMesh("x.x");
scene::IAnimatedMeshSceneNode* node= irrsmgr-> addAnimatedMeshSceneNode(mesh);
if(node)
{
node->setMaterialFlag(video::EMF_LIGHTING, false);
node->setFrameLoop(0, 100);
node->setMaterialTexture( 0, irrvideodriver->getTexture("texture.bmp") );
}
irrsmgr->addCameraSceneNode(0, core::vector3df(0,30,-40),core::vector3df(0,5,0));
while(irrdev->run())
{
irrvideodriver->beginScene(true,true,video::SColor(255,0,0,255));
irrsmgr->drawAll();
irrvideodriver->endScene();
}
irrdev->drop();
return 0;
}
_________________________________________________
I hope that you can understand the code easily...
Now... my problem is :
The mesh loads. But it doesn't animate
I think I haven't used the correct method... I've looked through the documentation and I stumbled upon a function IAnimatedMeshX
Unfortunately I haven't got the faintest idea on how to implement it.
The Irrlicht documentation supplies data based on the header... and, shamefully I am not able yet to understand that data.
If someone could point me to the correct solution to this problem... i would be extremely grateful
I mean... the syntax of the function IAnimatedMeshX or something
