Hello again:
 
    Anybody has there somo specs about preferred enviroment's (graphic card, o.s, etc.) for Java3D development running?
 
Thanks for advance.
-----Original Message-----
From: Illarramendi Amilibia, Aitor [mailto:[EMAIL PROTECTED]]
Sent: mi�rcoles 25 de julio de 2001 15:31
To: [EMAIL PROTECTED]
Subject: [JAVA3D] More about non proccesing behaviors.

Hello:
 
    It's me again.
 
    As I told before I'am having trouble with some behaviors attached to objects in the scene.
 
    I have a Canvas3D inside a JPanel and when I iconize it ant then after I deiconize it and the panel is activated the behaviors attached to the objects don�t seem to run more.
 
    The scene is composed like this (see the doc file).
 
    The behaviors are attached to the branchgroup node which is parent of the TransformGroup node of the object.
 
    The behaviors extend Java3D source's Behavior class.
 
    They have reimplemented initialize method for example like this one:
 
        public void initialize() {
            mouseEvents = new WakeupCriterion[3];
            mouseEvents[0] = new WakeupOnAWTEvent(MouseEvent.MOUSE_DRAGGED);
            mouseEvents[1] = new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
            mouseEvents[2] = new WakeupOnAWTEvent(MouseEvent.MOUSE_RELEASED);
            mouseCriterion = new WakeupOr(mouseEvents);
            wakeupOn (mouseCriterion);
            x = 0;
            y = 0;
            z = 0;
            x_last = 0;
            y_last = 0;
            z_last = 0;
      }
 
    Or this one:
 
        public void initialize() {
            _mouseEvents = new WakeupCriterion[1];
            _mouseEvents[0] = new WakeupOnAWTEvent (MouseEvent.MOUSE_PRESSED);
            _mouseCriterion = new WakeupOr(_mouseEvents);
            wakeupOn(_mouseCriterion);
        }
 
    So the WakeupOn criterion is based on an awt event.
 
    It looks like if the I were loosing awt events after panel deiconizing.
 
    The case is to know how to reinitialize behaviors, because of if I after deiconizing the panel I detach the branchgroup node parent of the object and I reinstantiate all the object and it's behaviors the 'new' object receives perfectly awt events.
 
    I mean, if after deiconizing the panel, when objects don�t seem to have reflected events over it's behavior's proccessStimulus method, if I create a new BranchGroup node for other object with the Shape3D, it's TransformGroup, it's own behaviors and all folks, the problem dissapears, all the behaviors start to work perfectly.
 
    Is like if I need to operate over the scene and make changes over it for recover behaviors running or receiving the events.
 
    I suffer the same trouble if I attach a 'keyboard navigation' behavior to the views transform, I need to reinstantiate it or it doesn�t receive keyboard events.
 
    I would like to know which events are prudicing when the Canvas3D or Java3D core detects window iconizing, if is that the case.
 
    I have been looking the code several times, and it isn�t that I'm loosing references of the behavior extending classes or others, all the instantiated objects still there.
 
    I tried to stop canvas renderer befor iconizing and start it after deiconizing, surely this is stupid and does no matter of doing this in this case.
 
    I tried too to trace if behaviors are alive with isLive() method and in other ways and they seem always alive.
 
    Other trouble I notice is that after iconizing the panel more than one time, the Canvas3D appears white, an only resizing it I could restore the Canvas3D's image.
 
    I have tried this code over two enviroments:
 
            Java3D - 1.2.1
            System - Windows 2k
            Graphic card - Matrox Millenium G400 with new drivers
 
           
            Java 3D - 1.2.1
            System - Windows NT Service Pack 6.0
            Graphic card - Matrox Millenium G200
           
    All is being developed and run under 1.3.1 java SDK and JRE.
 
    I would like to know too wich is the most recommended enviroment for Java3D applications, if possible.
 
Thanks for advance.
   
                                            
Aitor Illarramendi Amilibia
 
Ingeniero de software
Detecci�n, Mando y Control
 Indra.bmp
 
Carretera de Loeches, 9
28850 - Torrej�n de Ardoz, Madrid (ESPA�A)
Tel: +34-91-396.82.47
Fax: +34-91-396.81.14
 

Reply via email to