Re: [osg-users] Turn On/Off the Display HUD

2008-03-13 Thread Robert Osfield
On Wed, Mar 12, 2008 at 7:23 PM, Night Hawk
<[EMAIL PROTECTED]> wrote:
>  Is there a way I can only receive mails for replies to my threads and
>  not for all threads? (In some forums, they have that option of
>  "subscribing" to a thread, where a user gets the mail sequence of a
>  thread delivered directly to the mail box if he participates in any
>  thread. The rest of the threads he can always read on the list
>  directly).

I see you have a gmail account so just spend some time configuring the
gmail filters so it to automatically places all osg-users with its own
label (effectively like a folder).  This will keep all the posts off
your inbox and allow you to more easily follow different threads.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Turn On/Off the Display HUD

2008-03-12 Thread Jean-Sébastien Guay
Hello,

> Thank you for the detailed explanations.

My pleasure.

> Is there a way I can only receive mails for replies to my threads and
> not for all threads?

Not that I know. This is a mailing list, seems like it's all or nothing. 
Still, it's a good idea to be subscribed if you use OSG, you'll learn a 
lot just scanning the subjects and reading those that seem interesting!

You should use the filter functionality in your mail client to 
automatically put the messages in a folder separate from your other 
messages, and check them when you have a few spare minutes.

> Jeremy gave the osgWidget option - seems it works like window GUI in
> OSG. If that is the case I will try to use it for the UI rendering as
> I move to those parts.

That's a good idea, it's an interesting project and it would be cool to 
see it gather some steam and make it into core OSG! But for a simple use 
case like yours, node masks will do what you want.

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Turn On/Off the Display HUD

2008-03-12 Thread Night Hawk
Hello J-S,

Thank you for the detailed explanations.

The pickup mask answer you have given earlier worked like a charm :)

Couldn't thank you at that time though, because I am unable to follow
the mail sequences properly on these user lists. If I opt for
receiving mails, my mail box get flooded with lots of mails. If I
don't opt, then I have to hand pick the subjects and reply (and I am
not sure how to format that "re..sub" etc...)

Is there a way I can only receive mails for replies to my threads and
not for all threads? (In some forums, they have that option of
"subscribing" to a thread, where a user gets the mail sequence of a
thread delivered directly to the mail box if he participates in any
thread. The rest of the threads he can always read on the list
directly).

Anyway, thank you all for this great work and good user lists.

Jeremy gave the osgWidget option - seems it works like window GUI in
OSG. If that is the case I will try to use it for the UI rendering as
I move to those parts.

Thank you all.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Turn On/Off the Display HUD

2008-03-12 Thread Jeremy Moles
I do this in osgWidget by making my WindowManager derive from
osg::Switch, which provides setAllChildren{On/Off}. Plus, each
osgWidget::Window object provides show()/hide() methods, which just
communicate with parent WindowManager and ask it to hide/show
themselves.

What you should do though it just see if osgWidget can do some of what
you want, bug me to fix what it doesn't, and in the end help it get
better for submission to OSG. *grin* I only mention this because you
said "any good solution appreciated." :)

On Wed, 2008-03-12 at 23:46 +0530, Night Hawk wrote:
> Hello all,
> 
> I am displaying the nodes under mouse on a HUD (based on the Pick Example).
> 
> I am trying to turn this display on/off based on if user presses some
> key. However, I am having trouble implementing this. In my main GUI
> thread, user presses the key and I try to turn off the display (by
> setting a variable and cleaning up the text). But in the background
> the pick procedure is still running and it is sometimes causing thread
> sync problems for the variable and the Text box.
> 
> I am looking for more elegant way of doing this. My Display HUD is
> directly under the root (just as in the example). Is there a way I can
> turn off its visibility or make it "non-renderable"?
> 
> One way is I can remove and add the display HUD every time the key is
> pressed. But in that case we need to make our Root as Dynamic. I am
> not sure if that would be good approach. Is there no simple way,
> something like HUD->SetRenderable(false) ??
> 
> Or can I somehow make it "culled" ??
> 
> Any good solution is appreciated.
> 
> Thank you.
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Turn On/Off the Display HUD

2008-03-12 Thread Jean-Sébastien Guay
Hello,

> I am looking for more elegant way of doing this. My Display HUD is
> directly under the root (just as in the example). Is there a way I can
> turn off its visibility or make it "non-renderable"?

You were asking about node masks and picking a few days ago, right? You 
can use node masks for that too. Set the node mask of your HUD's root 
Group/Transform to 0. This will cause it not to be rendered (and not be 
pickable as well).

In OSG, the rendering is a traversal as well, so it has a traversal mask 
(default 0x). It logical-ANDs that to the current node's mask 
(also 0x by default) and if the result is nonzero, it goes into 
the subgraph (until it gets to the leaves, which are drawn if the result 
is nonzero). So by setting the mask of a node (or subclass of Node, like 
Group) to 0, you are forcing a result of 0, since (anything) & 0 = 0.

You can get into clever uses of node masks to make something pickable 
but not renderable, or renderable but not pickable, etc. Just remember 
that it isn't an equality test, it's a logical AND, so you have to put 
your binary hat on (assuming you're one of the 0001 out of 0010 who 
understand binary). :-)

Hope this helps,

J-S
-- 
__
Jean-Sebastien Guay[EMAIL PROTECTED]
http://www.cm-labs.com/
 http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Turn On/Off the Display HUD

2008-03-12 Thread Night Hawk
Hello all,

I am displaying the nodes under mouse on a HUD (based on the Pick Example).

I am trying to turn this display on/off based on if user presses some
key. However, I am having trouble implementing this. In my main GUI
thread, user presses the key and I try to turn off the display (by
setting a variable and cleaning up the text). But in the background
the pick procedure is still running and it is sometimes causing thread
sync problems for the variable and the Text box.

I am looking for more elegant way of doing this. My Display HUD is
directly under the root (just as in the example). Is there a way I can
turn off its visibility or make it "non-renderable"?

One way is I can remove and add the display HUD every time the key is
pressed. But in that case we need to make our Root as Dynamic. I am
not sure if that would be good approach. Is there no simple way,
something like HUD->SetRenderable(false) ??

Or can I somehow make it "culled" ??

Any good solution is appreciated.

Thank you.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org