You could try a scene graph like this:
Locale
/ \
/ \
/ \
/ \
BG BG
/\ /\
/ \ / \
BG1 SW1 BG2 SW2
/ /\ / /\
S1 B1 B2 S2 B3 B4
where BG = Branch Group, SW = Switch, B = Behavior, and S = Shape3D.
This way you can leave all the geometry active all the time, and
simply switch the behaviors on and off as needed. I don't know what
other things you application needs, but this should solve your behavior
problem.
Doug Twilleager
Java 3D Team
Sun Microsystems
>Delivered-To: [EMAIL PROTECTED]
>MIME-Version: 1.0
>Subject: [JAVA3D] Plz Explain!
>To: [EMAIL PROTECTED]
>
>Hi!
>
>Can somebody explain me this:
>
>I have four mouse behaviors (translate and rotate
>attached to one BG node) and translate, rotate
>attached to another BG node. I have primitives under
>both BG nodes. What i need is this:
>
>If I am interacting with primitives under BG1 node
>then
>mouse behaviors of BG2 should be deactivated that is
>user should not be able to interact with primitives
>under BG2 node. Similarly, when user flip back to some
>primitive under BG2 node then mouse Behaviors of BG1
>should be deactivated.
>
>I think it is achievable by detaching BGs but the
>problem is that primitives under that particular BG
>disappear, which I don't want.
>
>I just want to flip between Behaviors on the two BGs
>without making primitives to disappear from the
>screen.
>
>Please help me in this as I am putting this for fourth
>time.
>
>Thanks for any help.
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail
>http://personal.mail.yahoo.com/
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff JAVA3D-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".