Node masks are not inherited so if the parent node is off the children will
not get traversed...

In Open Flight you could do this by using switches by using Switch Masks to
to control with of the children will be visible

so in OSG you would not use the node mask but you would want to use is a
MultiSwitch and set/getActiveSwitchSet,


But having said that if the Nodes are named as below then can you not just
traverse each child of aircraft and set teh childrend maks as needed ?

you could also resturcutre using a MultiSwitch

Best Regards


Gordon

__________________________________________________________
Gordon Tomlinson
Email  : gordon.tomlinson @ overwatch.com
YIM/AIM: Gordon3dBrit
MSN IM : Gordon3dBrit @ 3dSceneGraph.com

__________________________________________________________
Telephone (Cell): (+1) 571-265-2612 <-- Note New Number
Telephone (Work): (+1) 703-437-7651

"Self defence is not a function of learning tricks
but is a function of how quickly and intensely one
can arouse one's instinct for survival"
- Master Tambo Tetsura

  -----
  From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mark Hurry
  Sent: Thursday, June 07, 2007 2:18 AM
  To: [email protected]
  Subject: [osg-users] Using Node Masks


    Hi,

    I have some legacy openflight models that I wish to use in my app.
Within the models there are nodes that I need to switch on and off.
Fortunately the nodes have a naming convention that allows me to find them.
However they are not switch nodes. I have set the node masks something like
the following



    Instance1                               -----------------------gear
0x02

                       \                         |

                         \
|----------------------engine_on              0x04

                           \                     |

    Instance2 ------------Aircraft--------|----------------------engine_off
0x08

                           /                     |

                         /
|----------------------engine_afterburner  0x16

                       /                         |

    Instance3                               |

                                                 Etc, etc





    Now my question is, do the lower nodes inherit and then AND the node
mask from Instance node? As what I would like to do is switch the various
lower nodes on and off by just setting a single node mask at Instance such
as 0x06 which would give me gear and engine_on everything else off?
Obviously I need a mechanism that has individual masks for each instance as
I do not want all instances to necessarliy have gear and engine_on.



    I have tried coding this but don’t get the results I would expect. I
have searched around and not found any examples or hints on how to do this.
Am I misunderstanding the use of Node Masks, and/or is there a betterway



    Thanks in advance for any help/suggestions



    Cheers



    Mark



    [EMAIL PROTECTED]

    Tel   +61 (0)89335 1239

    Mob +61 (0)405 095 104





    No virus found in this outgoing message.
    Checked by AVG Free Edition.
    Version: 7.5.472 / Virus Database: 269.8.11/837 - Release Date:
06-Jun-07 2:03 PM

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to