Page 1 of 1

GuiScene

Posted: Thu May 23, 2013 4:57 pm
by Der Walden
Helly Guys, here is a nice Little Code-snippet i have created called GuiScene...
It is an Complete SceneManager inside an IGUIElement.
It is designed to be a easy Mesh-Showcase for the Irrlicht-GuiSystem.
It allso supports rotating the viewed Mesh using the Mouse.

To show it in Action i have created a Demo based on the original Irrlicht-Demo "05.UserInterface".
Just Click the "New Window"-Button in the Demo and Play around with it... :wink:

Here is a Screenshot of it in Action and The Demo + Source as Download...
Image
http://derwalden.de.funpic.de/Irrlicht/ ... neDemo.zip

Re: GuiScene

Posted: Fri May 24, 2013 4:43 pm
by ledgarl
cool!
look nice :)

Re: GuiScene

Posted: Mon May 27, 2013 2:10 pm
by Granyte
it seem very nice but sadly it's a little to limited as it's built around rendering a single mesh

Re: GuiScene

Posted: Tue May 28, 2013 3:20 pm
by Der Walden
No its not limited to render just a single mesh...

Just take a look to the GUIScene.h and you will see this functions:

Code: Select all

 
        ISceneManager *GetScene(void);
        ICameraSceneNode *GetCamera(void);
        void SetOptimalCamDistToNode (ISceneNode *aNode);
 
        IAnimatedMeshSceneNode* setMesh (IAnimatedMesh *aMesh = 0, bool updateOptimalCamDist = true);
        IAnimatedMeshSceneNode* setMesh (stringw aFileName, bool updateOptimalCamDist = true);
        void enableMouseRot (bool aEnable);
In the Demo only the setMesh and the enableMouseRot functions are used so show the standard Case of using it as "Mesh-Showcase"

So if you want to use it in an other way you can easily doo this by using the GetScene function to get a Pointer to the ISceneManager of the GUIScene.

By using this Pointer you can setup your sceene as already known.

The SetOptimalCamDistToNode function allows you to focus anny node of the Scene you have created. It Calculates the optimal Position for the Camera to show the whole node in the GuiScenes Clipping-rect based on the boundingbox of the given node.

Re: GuiScene

Posted: Wed May 29, 2013 10:18 am
by Granyte
wow I completely missed this when I looked at your code it's really great is there any usage restriction on your code?

Re: GuiScene

Posted: Wed May 29, 2013 8:05 pm
by Der Walden
:wink: Without irrlicht this code would not exsit... So no there is no usagerestriction. Beeing informed about improvements or bugfixes would be nice.