irrEdit and irrKlang Scene Node

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
eviral
Posts: 91
Joined: Mon Oct 25, 2004 10:25 am

irrEdit and irrKlang Scene Node

Post by eviral »

Hello,

I'm using irrEdit to define position of the 3D sounds of my game.

In the wiki, i found this great method to apply collisions to objects defined in the .irr file :

void CNewtonGame::recursiveFillMetaSelector(scene::ISceneNode* pNode)
{

printf ("Node name is: %s \n",pNode->getName());
printf ("Node id is: %d \n",pNode->getID());
printf ("Node type:");
// printf ("Node type: %s=",smgr->getSceneNodeTypeName());
if (pNode->getType() == ESNT_UNKNOWN) printf("Unknown mesh type \n\n");
else if (pNode->getType() == ESNT_MESH) printf("Standard Mesh \n\n");
else if (pNode->getType() == ESNT_ANIMATED_MESH) printf("Animated Mesh! \n\n");
else if (pNode->getType() == ESNT_SKY_BOX) printf("SkyBox! \n\n");
else if (pNode->getType() == ESNT_SKY_BOX) printf("SkyBox! \n\n");
else if (pNode->getType() == ESNT_CAMERA_FPS) printf("Fps Camera! \n\n");
else if (pNode->getType() == ESNT_CAMERA_MAYA ) printf("Maya Camera! \n\n");
else if (pNode->getType() == ESNT_CAMERA && strNodeName.equals_ignore_case(L"CameraMain"))
....



I have 2 questions :

1. Are 3D sounds played automatically when doing a loadScene("myLevel.irr) ???

2. if not, how can i get detect an IrrKlang scene node using something like ESNT_SKY_BOX (ESNT_IRRKLANG_SCENE_NODE doesn't seems to exist)



Thanks

Eviral
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

You need to know the result of getType() when called on the CIrrKlangSceneNode. If you look at the irrKlang code provided by Niko, he uses...

Code: Select all

#ifdef MAKE_IRR_ID
const int IRRKLANG_SCENE_NODE_ID = MAKE_IRR_ID('i','k','n','g');
#else
const int IRRKLANG_SCENE_NODE_ID = 'ikng';
#endif // MAKE_IRR_ID
Travis
MasterGod
Posts: 2061
Joined: Fri May 25, 2007 8:06 pm
Location: Israel
Contact:

Post by MasterGod »

vitek wrote:

Code: Select all

#ifdef MAKE_IRR_ID
const int IRRKLANG_SCENE_NODE_ID = MAKE_IRR_ID('i','k','n','g');
#else
const int IRRKLANG_SCENE_NODE_ID = 'ikng';
#endif // MAKE_IRR_ID
Travis
const int IRRKLANG_SCENE_NODE_ID = 'ikng';
what will go into IRRKLANG_SCENE_NODE_ID?
Image
Dev State: Abandoned (For now..)
Requirements Analysis Doc: ~87%
UML: ~0.5%
Post Reply