IGuiMeshviewer scale mesh
-
saltytaco1234
- Posts: 20
- Joined: Wed Dec 15, 2010 10:39 pm
IGuiMeshviewer scale mesh
I'm using the IGUIMeshviewer everything's working correctly. All I want to know is, how do you scale a mesh in the IGUIMeshViewer?
Re: IGuiMeshviewer scale mesh
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:
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
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
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
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
... 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
Neither ways work, so I might do a viewport or something, do a bunch of math, and see how that goes.
Re: IGuiMeshviewer scale mesh
Ooops, I misunderstood - I was thinking about the MeshViewer and overread the IGui part.saltytaco1234 wrote:Ummm... did I misunderstand you, or did you misunderstand me?
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
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
I saw tutorial #13 I'm going to use render to Texture.
