How can I determine the size of a mesh? I have a *tile* mesh (a box) and I can exactly find its size in coordinate system units to make fit exactly each tile in a plane without spaces.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't address your question, but I can provide an alternative.
For tiles, if you really don't need a full cube, the hillplane mesh is a good helper to use for tiles. You would just need to slap them into some scenenodes and set the texture.
Well, what I mean is to calculate the size in coordinate units, so I know that the mesh, when drawn, will span N units in X axis, N2 in Y axis and so on.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How can I determine the size of a mesh? I have a *tile* mesh (a box) and I can exactly find its size in coordinate system units to make fit exactly each tile in a plane without spaces.
I can't address your question, but I can provide an alternative.
For tiles, if you really don't need a full cube, the hillplane mesh is a good helper to use for tiles. You would just need to slap them into some scenenodes and set the texture.
[code]
irr::core::dimension2d<irr::f32> tilesize = irr::core::dimension2d<irr::f32>(256.0f,256.0f);
irr::core::dimension2d<irr::s32> tilecount = irr::core::dimension2d<irr::s32>(2,2);
irr::f32 hillheight = 0.0f;
irr::core::dimension2d<irr::f32> hillcount = irr::core::dimension2d<irr::f32>(0.0f,0.0f);
irr::core::dimension2d<irr::f32> texturerepeat = irr::core::dimension2d<irr::f32>(8.0f,8.0f);
lbMesh = smgr->addHillPlaneMesh("field",tilesize,tilecount,0,hillheight,hillcount,texturerepeat);
[code]
Thanks for the idea. I dont use a full cube, just a thin box and I apply the adequate texture.
> I can't address your question,
Me too. :) But if you want to get the Bounding box of your box and use IMesh or IMeshBuffer, then getBoundingBox is the right method for you.
Well, what I mean is to calculate the size in coordinate units, so I know that the mesh, when drawn, will span N units in X axis, N2 in Y axis and so on.
Then getBoundingBox() is the thing you want. :)