Features
- Multiple 'decalable' meshes
- Decal size, orientation & rotation
- Decal Max distance
- Decal Lifetime
- Decal Fade out + fade out time
How to use
Code: Select all
// Create decal manager
DecalManager* decalManager = new DecalManager(smgr);
// Set terrain and add some meshes where decals can be placed
decalManager->setTerrain(terrain);
decalManager->addMesh(wallNode);
decalManager->addMesh(rockNode);
// Create a decal
irr::core::vector3df position = irr::core::vector3df(123, 10, 123); // Position to place the decal
irr::core::vector3df dimension = irr::core::vector3df(2, 2, 2); // Dimension of decal
irr::core::vector3df normal = irr::core::vector3df(0, 1, 0); // Orientation of the decal
irr::f32 textureRotation = 45; // Rotation in degrees
irr::scene::ISceneNode* parent = 0; // Parent
irr::f32 lifeTime = 0; // Time to life
irr::f32 distance = 250; // Max viewing distance
decalManager->addDecal("mydecal.png", position, dimension, normal, textureRotation, parent, lifeTime, distance);
Download
Download
IrrExt mirror
TODO
- Triangle clipping