Chien and Peter:
   What I want to do is to replace the whole scene graph by another one. Without 
collision behavior as descendant of the root, I can do it. But if there are collision 
behavior nodes exist, I will encounter this exception. How can I achieve my goal? Do 
you have any suggestions? It seems if the collision behavior has been added into the 
scene, there is no way to remove it. I don\'t think it is appropriate.
   I am going to mad......
   
---Liu----


----- Original Message -----
From: Chien Yang <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: 
Subject: Re: [JAVA3D]

Samuel and Peter,

        Looks like a logic bug in the test program. You are detaching
the parent of your armingNode.

        pLocale
           |
        pBGroup  <--- detach this node.
           |
        pTGroup  <--- Collision armingNode.
           |
         pBox

- Chien.


Peter Antoniac wrote:
> csec> Chien Yang,
> csec> Here is the code. It mostly comes from the code of bug 4910683
> csec> submitted by Peter Antoniac(Thanks goes to him:-) Until I carefully
> csec> read through this piece of code have I realized we are having the
> csec> same problem, forgive me, anyway, I am a newcomer to j3d.....), What
> csec> I have changed is in line 80:
> csec> The orginal code is:
> csec> pCHandle=new CollisionHandler(pBox);
> csec> I change this to:
> csec> pCHandle=new CollisionHandler(pTGroup_1);
>
> Yes. Based on my analysis (unfortunately I don\'t have access to the Java3D
> source code) the problem is caused by the separation between the rendering
> thread and the collision thread. Because of this separation when you add a
> node with collision it might be that the node shows well (the rendering is
> done) but the behaviour node operation is not yet installed (and hence the
> matrix is not updated). Probably the workout is to synchronize better
> between the two threads (if my assumption is correct).
>
> My proposed workaround was to place a big delay between the adding and
> removing of the node/branch/etc. In this way you assure that the behaviour
> node is installed correctly and you don\'t get the NullPointer exception...
> My comments there were: "CUSTOMER SUBMITTED WORKAROUND : One method that
> used to work was to introduce a big wait (10000) before removing the branch
> group. It used to work under Linux OS but it doesn\'t work anymore under
> Windows OS. (Incident Review ID: 186599)"
>
> Still, I am not sure if this is the same problem as Liu encounter...but the
> bug is quite old and annoying and some votes there might get Java people on
> it faster. Here is the link:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910683
>
> Cheers,
> Peter
> .----------------------------------------------------------------
> | Peter Antoniac, Assistant Professor
> | University of Oulu, Dept. of Information Processing Science
> | P.O.Box 3000, FIN-90014 Oulu, Finland
> | http://marisil.org/peter
>
> ===========================================================================
> 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".

 

Reply via email to