Hi Sameer, > >I have the following scenegraph: > >BranchGroup >|_____TransformGroup > |_____ BranchGroup b > |____ BranchGroup b1 > |_______ Morph m1 > |_______ Morph m2 > |_______ Behavior object with trigger as mouse click > |____ BranchGroup b2 > |____ BranchGroup b3 > |____ BranchGroup b4 > >b1, b2, b3 and b4 are identical with different geometries. >m1 and m2 are different morph objects. > >At some stage, I want to replace the geometries of b1 with some other >geometry. >But, due to some bug in Java3D, I have to detach this branchgroup, create a >new >one with the other geometry and attach it to the branchgroup b. Can you please give us a test program to show this bug ? > >Replacing (attaching and detaching) of the geometry b1 works fine, but after >that, >when I try to pick the object using the mouse, it gives me the following >exception: > >Exception occurred during Behavior execution: >java.lang.IllegalStateException: Picking can only work if BranchGroup is >alive > at javax.media.j3d.BranchGroup.pickAll(BranchGroup.java:115) > at >com.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(PickTool.java: >793) > at >com.sun.j3d.utils.picking.PickTool.pickGeomClosestIntersect(PickTool.java:84 >7) > at com.sun.j3d.utils.picking.PickTool.pickClosest(PickTool.java:515) > at >com.liqwidkrystal.vBook.behaviors.MorphBehavior.processStimulus(MorphBehavio >r.java:258) > at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167) > at javax.media.j3d.J3dThread.run(J3dThread.java:256) > >Is it not that when I add a BranchGroup to an already compiled branch group >(b in this case), >the added branch group becomes live? This mean the BranchGroup did not successfully add to the scene graph. Which function do you use to add/replace the old branchgroup ? You should get some kind of Exception when adding a branchgraph but not success. Please make sure you don't catch the Exception and ignore the message. > >Also, the behavior is expected till the mouse is clicked on the geometry of >the >newly added branch group. > >Am I doing something wrong? Or something more has to be done to make the >newly >added branch group live? > > Thanks. - Kelvin ---------------- Java 3D Team Sun Microsystems Inc. =========================================================================== 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".
