How to remove shadow from IAnimatedMeshSceneNode

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
Tooh
Posts: 5
Joined: Fri May 27, 2005 3:56 am

How to remove shadow from IAnimatedMeshSceneNode

Post by Tooh »

The following code, I added shadow to mesh.

Code: Select all

scene::ISceneManager *pSceneManager;
pSceneManager = pIrrlichtDevice->getSceneManager();

scene::IAnimatedMeshSceneNode *pAnimatedMeshSceneNode;
pAnimatedMeshSceneNode = pSceneManager->addAnimatedMeshSceneNode(pSceneManager->getMesh("Mesh.md2"));

scene::IShadowVolumeSceneNode *pShadowVolumeSceneNode;
pShadowVolumeSceneNode = pAnimatedMeshSceneNode->addShadowVolumeSceneNode();

scene::ISceneNode *pLightSceneNode;
pLightSceneNode = pSceneManager->addLightSceneNode(0, 0, 0x00ff0000, 40.0f);
pLightSceneNode = pSceneManager->addBillboardSceneNode(pLightSceneNode, core::dimension2d<f32>(128, 128));
pLightSceneNode->setMaterialTexture(0, pVideoDriver->getTexture("Light.bmp"));
I want to know:
1. How to remove pLightSceneNode (that has a BillboardSceneNode) from pSceneManager.
2. How to remove pShadowVolumeSceneNode from pAnimatedMeshSceneNode.

Please help. :(
Myth
Posts: 81
Joined: Wed Apr 13, 2005 5:48 pm

Post by Myth »

If oyu don't want a shadow just don't create one.
If you want to realtime delete it you can try this:

Code: Select all

pShadowVolumeSceneNode->drop();
// or maybe
pAnimatedMeshSceneNode->addShadowVolumeSceneNode(0,0,false);
It will proberly won't do anything or give an expection..
And the 2nd thing is bad coding.
You can give it a try I guess..

- Myth
JOIN MY (100mbs 2x 3GHZ CPU) IRRLICHT FORUMS
http://irrlicht.halo4you.com/forums/
For all your programming quesitons and irrlicht ones!.

My fan site: http://www.halo-center.com
Post Reply