possible to set size of mesh? [solved]

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
instinct
Posts: 87
Joined: Sat May 10, 2008 3:42 pm

possible to set size of mesh? [solved]

Post by instinct »

I was wondering if it is possible to set the size of an AnimatedMesh, just like you can when calling Smgr->addCubeSceneNode().

Since every mesh can have a different size, depending on how it's modeled, this is a problem for me. For example, when i have 2 models of buildings, they can have different sizes when i give both models a scale of (1,1,1). I have to be able to scale every mesh to a certain size, and after that i have to scale the SceneNode using that mesh accordingly. I'm retrieving dimensions of objects from a database...

I can understand that the text above can be confusing, that's why i'll give an example of my problem.

Assume i have 2 models, one of a carton box and one of a metal barrel. I need to make both SceneNodes using these models the same size. However, their dimensions are different. The cardbox's dimensions can be 25x10x15 and the barrel's default dimensions can be 10x60x10. As a result of this i have to scale them differently. If it is possible to scale both meshes to an equal size, and use the scales in the DB to scale them to their correct sizes, that would be much easier! But, how do i do this?
Last edited by instinct on Mon Jan 04, 2010 11:25 am, edited 1 time in total.
instinct
Posts: 87
Joined: Sat May 10, 2008 3:42 pm

Post by instinct »

This can be done easily by using Smgr->getMeshManipulator()->scale().

Sorry for not looking into the docs better :oops:

I'll leave it here if some1 is wondering about this...
Post Reply