As a little drawing say more than lot of words, let's look at this:
![Image](http://img356.imageshack.us/img356/2237/sydneycrossingpz6.jpg)
How ugly.
It would be nice if IAnimatedMesh could update the bounding box while the animation is running.
Is it possible ? Or may i have to do it myself ?
Hmm well, i don't understand eitherhybrid wrote:Some animated mesh do that, e.g. md2. So I don't understand why yours doesn't
Code: Select all
/* based on irrlicht sample: 01.HelloWorld
i've stripped all i could, to only keep the bare minimum for running.
i've added the bounding box visibility.
*/
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
int main()
{
IrrlichtDevice *device =
createDevice( video::EDT_OPENGL, dimension2d<s32>(640, 480), 16, false, false, false, 0);
device->setWindowCaption(L"Hello World! - Irrlicht Engine Demo");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IAnimatedMesh* mesh = smgr->getMesh("sydney.md2");
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
//show me the bounding box, Lebowski!
node->setDebugDataVisible(EDS_BBOX);
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation ( scene::EMAT_RUN );
}
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}