Pls help me in this:

I have a scene graph like this:

objRoot->objTran->bg1->objTrans1-> sphere
objRoot->objTran->bg2->objTrans2-> cone
objRoot->objTran->bg3->objTrans3-> cylinder
objRoot->objTran->bg4->objTrans4-> Box
objRoot->objTran1


I have attached MouseTranslate and MouseRotate
behaviors to objTran.Also, I have attached
PickTranslate. PickRotate, and Pick Zoom
behaviors to objTran1 (U can also attach mouse
behaviors).

I am now detaching branchgroups(bg1,bg2,bg3,bg4) from
objTran and attaching them to objTran1 by executing
slbehavior.

What i want from the application is that, if I detach
a primitive/primitives from objTran and attached them
to objTran1, there should be two groups of primitives
that is if user is interacting with one group it
should not have any affect on primitives belong
to another group. To achieve that, I have attached
mousebehaviors to both objTran and ObjTran1,
which makes two groups.

I am not able to understand one thing:

When u interact with objects under objTran, there will
will be no affect on detached primitives, which are
now being attached to objTran1 (which is ok as now
they belong to different groups)but when u interact
with primitives under objTran1, primitives under
objTran also moves (which is not desired and is weird
because behaviors are attached to totally different
transformgroup nodes and so if u are interacting with
primitives under one TG, it should not affect
primitives under other TG.


Also, if instead of attaching pick behaviors, we
attach Mouse behaviors to ObjTran1, then there is no
effect of detaching primitives from objtran. That is
all the primitives whether attached or detached
translate or rotate as if they are part of a group,
although they are not.Please explain me this weird
behavior.

i am attaching program with this mail, for better
understanding. Please run the program and click on
primitives to see the behavior.

Thanks

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

SimplePicking.java

Reply via email to