Terminal type gui

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
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Terminal type gui

Post by Macrixen »

Hi first time poster here. So sorry if this is in wrong forum, but here it goes.
I am wondering if it were possible to make a terminal gui. An interface touch screen like in Star Trek. I know it's possible to have an interface like that, just want to know if it were possible to do such a thing with irrlicht and if so could someone point me in the direction of where I could learn how to do it or a basic example i could learn from. Thanks in advance.
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yep pretty much anything is possible with Irrlicht. If you could explain a bit more what you actually want to do that would be great.

So from what i can tell you want like a big star trek style 'input board' in front of you. Should this be 3D? Can you move away from it or is it always in front of the screen at the same distance? How do you want to interact with it? Mouse clicks on certain 'buttons' on the interface?
Image Image Image
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Post by Macrixen »

what i have in my mind is something that you can walk away from. For example...

A computer screen is across the room... walk up to it, you'll see 2d buttons which do things like bring up some info on the same computer screen.

A keypad for entering a code.

The only thing that would remain on the player's screen would be things like health, everthing else would be from interactable computers like a tablet pc
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

So how does the user interact with the computer screen/keypad? Do they use the mouse to click on buttons on the keypad? Or do they use their keyboard somehow?

Basically you make a model of your computer screen, keypad etc. Render it and then check if the player is near enough to the keypad, if so then you allow them to interact, if it's with the mouse then you do some raycasts to see which buttons were clicked on. If you look at the collision tutorial it will show you how to know what object the mouse is over.
Image Image Image
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Post by Macrixen »

thanks i was thinking along those lines myself and yes they would use the mouse pointer to interact with it
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Post by Macrixen »

Ok a new question, but is related to the original one...

I got the collision detection working, but how do i have it tell me which mesh the triangle belongs to? would using bounding box collision detection be better? Or would the parent node bounding box interfere with the ui elements?
kornwaretm
Competition winner
Posts: 189
Joined: Tue Oct 16, 2007 3:53 am
Location: Indonesia
Contact:

Post by kornwaretm »

use getSceneNodeFromRayBB.......
with [ url = http://en.wikipedia.org/wiki/Mask_(computing) ] bit masking [/url]
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Yeah you're better off with bounding box detection as you probably won't need the accuracy of triangle selection and as you've found it's actually very hard to find out what the triangle belongs to afterwards.

You may want to check out this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... 925#172925

I was discussing something very similar there.
Image Image Image
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Post by Macrixen »

kornwaretm wrote:use getSceneNodeFromRayBB.......
with [ url = http://en.wikipedia.org/wiki/Mask_(computing) ] bit masking [/url]
Ok... how do i use bit masking to determine which mesh the triangle belongs to, some example code might help me there
jp wrote:Yeah you're better off with bounding box detection as you probably won't need the accuracy of triangle selection and as you've found it's actually very hard to find out what the triangle belongs to afterwards.

You may want to check out this thread:
http://irrlicht.sourceforge.net/phpBB2/ ... 925#172925

I was discussing something very similar there.
thanks!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

getSceneNodeFromRayBB will return you the node which a ray hits and the node will be selected by using bounding box collision. You can use bitmasking to prevent certain nodes from being tested against, based on what their ID is set to.
Image Image Image
Macrixen
Posts: 9
Joined: Tue Oct 07, 2008 7:01 pm

Post by Macrixen »

ahh ok thnks again
Post Reply