IGuiMeshviewer scale mesh

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
saltytaco1234
Posts: 20
Joined: Wed Dec 15, 2010 10:39 pm

IGuiMeshviewer scale mesh

Post by saltytaco1234 »

I'm using the IGUIMeshviewer everything's working correctly. All I want to know is, how do you scale a mesh in the IGUIMeshViewer?
CuteAlien
Admin
Posts: 9940
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGuiMeshviewer scale mesh

Post by CuteAlien »

You type the x,y,z scale values into the "scale" editfield and press "set". Or with newer versions (trunk) you can also click the *10 and *0.1 Buttons.
If it does not work you have probably a collada file... that's something I just noticed recently. The problem with those is that it does not load a mesh but scene, so right now our scale-buttons don't do anything for that. Might be changed some day.

As workaround for single collada-meshes you can outcomment that line:

Code: Select all

 
smgr->getParameters()->setAttribute(scene::COLLADA_CREATE_SCENE_INSTANCES, true);
 
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
saltytaco1234
Posts: 20
Joined: Wed Dec 15, 2010 10:39 pm

Re: IGuiMeshviewer scale mesh

Post by saltytaco1234 »

Ummm... did I misunderstand you, or did you misunderstand me?
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: IGuiMeshviewer scale mesh

Post by christianclavet »

I'm not sure, but you will have to scale the mesh in the mesh buffer, the MeshViewer GUI element doesnt use a real camera. Or play with matrix transformations...
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Re: IGuiMeshviewer scale mesh

Post by shadowslair »

... or try scaling the mesh you send using the manipulator ( smgr->getMeshManipulator()->scale(yourMesh, newScaleVec); )
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
saltytaco1234
Posts: 20
Joined: Wed Dec 15, 2010 10:39 pm

Re: IGuiMeshviewer scale mesh

Post by saltytaco1234 »

Neither ways work, so I might do a viewport or something, do a bunch of math, and see how that goes.
CuteAlien
Admin
Posts: 9940
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IGuiMeshviewer scale mesh

Post by CuteAlien »

saltytaco1234 wrote:Ummm... did I misunderstand you, or did you misunderstand me?
Ooops, I misunderstood - I was thinking about the MeshViewer and overread the IGui part.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
saltytaco1234
Posts: 20
Joined: Wed Dec 15, 2010 10:39 pm

Re: IGuiMeshviewer scale mesh

Post by saltytaco1234 »

I saw tutorial #13 I'm going to use render to Texture.
Post Reply