Problems with changed example 15.LoadIrrFile

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
bogQ
Posts: 11
Joined: Sat Jan 09, 2010 1:06 pm

Problems with changed example 15.LoadIrrFile

Post by bogQ »

I edited scene::ESNT_ANIMATED_MESH with adding 2 printf lines for comparing results
While first printf return 1752395105 witch shud be correct according to MAKE_IRR_ID if im not wrong.
node->getType() display 1700951395 witch shud not be correct

So either i'm trying to printf incorrect type or node->getType() isn`t returning something correctly because of my mistake of understanding how something works.

Code: Select all

        case scene::ESNT_ANIMATED_MESH:
            // Because the selector won't animate with the mesh,
            // and is only being used for camera collision, we'll just use an approximate
            // bounding box instead of ((scene::IAnimatedMeshSceneNode*)node)->getMesh(0)
            printf ("Ids: %u\n", scene::ESNT_ANIMATED_MESH);
            printf ("Ids: %u\n", node->getType());  
            selector = smgr->createTriangleSelectorFromBoundingBox(node);
        break;
Question 1
MAKE_IRR_ID and getType() should return u32 , correct?

Question 2
Why the results are printf-ed differently but still the 'case scene::ESNT_ANIMATED_MESH:' is triggered correctly, what am i doing wrong?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Problems with changed example 15.LoadIrrFile

Post by CuteAlien »

You dropped the important line from your code :-) If you check the original code that case-switch catches either ESNT_ANIMATED_MESH or ESNT_CUBE. You get a ESNT_CUBE.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply