Kelvin:
Thanks for the prompt reply.
>Which version of Java3D are you using ?
We are using Java 3D 1.2.1_03 and the JavaTM 2 Platform, Standard Edition
v1.3.1_01
>What wakeup criteria are use in the custom behavior ?
Here is a code snippet.
****
criterion = new WakeupCriterion[7];
criterion[0] = new WakeupOnAWTEvent(MouseEvent.MOUSE_MOVED) ;
criterion[1] = new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
criterion[2] = new WakeupOnAWTEvent(MouseEvent.MOUSE_DRAGGED);
criterion[3] = new WakeupOnAWTEvent(MouseEvent.MOUSE_CLICKED);
criterion[4] = new WakeupOnAWTEvent(MouseEvent.MOUSE_RELEASED);
criterion[5] = new WakeupOnAWTEvent(KeyEvent.KEY_RELEASED);
criterion[6] = new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED);
wakeupOn( new WakeupOr( criterion ));
>Can you check to see if the custom behavior public void initialize()
>method is being invoked every time the behavior branch
>is detach and attach again ?
Yes, I did check that. And the public void initialize method is getting
called every time a new VRML world is loaded.
>When window minmize and maximize again, there is
>some wakeup conditions flag in behavior being reset.
>You can achieve the same effect by using start/stop
>View.
After the new VRML world is loaded, I tried couple of things (as I mentioned
earlier). Here is some code snippet
Canvas3D canvas3D = vrmlDisplayer.getCanvas3D();
View view = canvas3D.getView();
view.stopView();
view.startView();
view.stopBehaviorScheduler();
view.startBehaviorScheduler();
canvas3D.stopRenderer();
canvas3D.startRenderer();
But even then the processStimulus method is not getting called. The only
time it does get called when I manually minimize and maximize the window.
Let me know if you can help in any ways.
Thanks,
Rahul
>
>
> >Delivered-To: [EMAIL PROTECTED]
> >X-Originating-IP: [24.181.197.54]
> >Mime-Version: 1.0
> >X-OriginalArrivalTime: 10 Sep 2001 19:25:21.0313 (UTC)
>FILETIME=[55106910:01C13A2E]
> >Date: Mon, 10 Sep 2001 19:25:21 +0000
> >From: Rahul Choudhury <[EMAIL PROTECTED]>
> >Subject: [JAVA3D] processStimulus is not getting called..
> >To: [EMAIL PROTECTED]
> >
> >Hi all:
> >
> >I am using Java3D in an application used for 3D training. The application
> >uses VRML worlds for its 3D data. We have a VRML loader/browser which
>loads
> >and manipulates the world. The application has 3 modes. In each mode a
> >separate VRML world is loaded (after unloading the old VRML world). So at
>a
> >time there is only one VRML world loaded.
> >
> >Every time a vrml world is loaded, we attach a customized Behavior node
> >(CustomBehavior) to the world, which helps users to navigate around.
>Other
> >than navigation, it also assists in notifying when user touches a
> >TouchSensor or performs other activities.
> >
> >The problem that I have happens only when an old VRML world is unloaded
>and
> >the new one is loaded
> >
> >Lets say the User changed mode from Mode A to Mode B
> >
> >1. The application unloads the VRML World 1 related to Mode A. We make
>sure
> >that the world is properly unloaded. We called
> >VirtualUniverse.removeAllLocales and made sure all other references
>related
> >to the World 1 are gone. I run the application using OptimizeIt and found
> >that in deed all necessary memory was freed up and unloading was
>happening
> >properly. So no problem so far.
> >
> >2. The world then loads up VRML World 2 related to mode B. I can see the
> >world. However I can not move around or click on any TouchSensor.
> >
> >After further investigation, I found out the reason. I saw that the class
> >CustomBehvaior which is responsible for navigation etc, is not receiving
>and
> >processStimulus method from Java3D scheduler. As a result, nothing was
> >happening.
> >
> >I also noticed that when I manually minimize (iconify) the application's
> >JFrame (by clicking on Frame's minimize icon) and maximize it again,
> >everything becomes OK. In other words, the processStimulus method of the
> >CustomBehavior class starts getting call from Java 3D scheduler as and
>when
> >user presses / drags mouse on the Canvas3D.
> >
> >I would like to know if there is any solution to this problem. I tried
> >stopping and starting the renderer after the second world is loaded. That
> >didn�t work. I invalidated and validated the parent Frame (as well as
> >Canvas3D) after the second world is loaded. That didnt work too. I tried
> >repainting everything, that didn't work as well.
> >
> >I am wondering what happens in the Java3D renderer when I manually
>minimize
> >and maximize the parent Frame. Because whatever it is, that apparently
>fixes
> >my problem.
> >
> >_________________________________________________________________
> >Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
> >
> >===========================================================================
> >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".
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
===========================================================================
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".