Have you considered subclassing your scene graph Nodes (the ones you're
interested in) like this? It might require a lot of tedious subclassing but
I don't think there is any other way to get the Java3D system to notify you
of scene graph changes. The other way might be to have a thread constantly
traversing the scenegraph and comparing its current state to the previous
state (stored by the thread during the previous traversal) but this would
require tons of permissions to be set, lots of memory, lots of processing
time and would surely cripple the performance of your application.

class MyEventCatcher{
    public void addChild( Group parent, Node child ){
        System.out.println( "addChild" );
    }
    public void setAppearance( Shape3D shape, Appearance app ){
        System.out.println( "setAppearance" );
    }
}

class SomeClass{
    MyEventCatcher eventCatcher = new MyEventCatcher();

    public TransformGroup sceneTG = new TransformGroup(){
        public void addChild( Node child ){
            super.addChild( child );
            eventCatcher.addChild( this, child );
        }
    };
    public Shape3D shape = new Shape3D(){
        public void setAppearance( Appearance app ){
            super.setAppearance( app );
            eventCatcher.setAppearance( this, app );
        }
    };
}


-----Original Message-----
From: Daniel Balaguer Yagan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 9:24 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] watcher Thread


hi there again,
        has anyone of you guys implemented a Thread that watches the state
of the live scene graph? this Thread specifically watches which of the
objects in the live scene have changed their Geometry and Appearance
components, and then performs a certain action.

daniel

===========================================================================
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