Showing boundaries on Cube Scene Node
-
- Posts: 105
- Joined: Thu Jan 10, 2008 6:26 pm
Showing boundaries on Cube Scene Node
Is it possible to draw boundaries on the cubeSceneNode's I am using a chain of them to form a playing field and need one to be distinguished from the other.
http://irrlicht.sourceforge.net/phpBB2/ ... 029#143029
-Game Link added download and play
-Game Link added download and play
maybe show it's bounding box ???
Code: Select all
theCube->setDebugDataVisible(EDS_BBOX);
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
-
- Posts: 105
- Joined: Thu Jan 10, 2008 6:26 pm
Boundig box : Doesnt show boundaries
Thanks for the suggestion Acki
But the bounding box does not seem to have the effect I need. I need the whole cube, and all its edges to be outlined with black , the bounding box just kinda shows some squiggly white areas outside of the mesh.
But the bounding box does not seem to have the effect I need. I need the whole cube, and all its edges to be outlined with black , the bounding box just kinda shows some squiggly white areas outside of the mesh.
http://irrlicht.sourceforge.net/phpBB2/ ... 029#143029
-Game Link added download and play
-Game Link added download and play
Code: Select all
void OutlineMesh(IAnimatedMeshSceneNode* mesh,float Width,unsigned int R,unsigned int G,unsigned int B)
{
SMaterial tmat[MATERIAL_MAX_TEXTURES],lmat;
lmat.DiffuseColor = SColor(255,R,G,B);
lmat.SpecularColor = SColor(255,R,G,B);
lmat.AmbientColor = SColor(255,R,G,B);
lmat.EmissiveColor = SColor(255,R,G,B);
lmat.BackfaceCulling = false;
lmat.FrontfaceCulling = true;
lmat.Lighting = true;
lmat.Thickness = Width;
lmat.Wireframe = true;
for(unsigned int i = 0;i<mesh->getMaterialCount();i++)
{
tmat[i] = mesh->getMaterial(i);
mesh->getMaterial(i) = lmat;
}
mesh->render();
for(unsigned int j = 0;j<mesh->getMaterialCount();j++)
mesh->getMaterial(j) = tmat[j];
}
-
- Posts: 105
- Joined: Thu Jan 10, 2008 6:26 pm
Whoa !!
Whoa !! That much just to get a simple boundary on a cube
Still , thanks a lot I'll try it out !
Still , thanks a lot I'll try it out !
http://irrlicht.sourceforge.net/phpBB2/ ... 029#143029
-Game Link added download and play
-Game Link added download and play