Lee Zhou wrote:

>-Hi,
>
>Does any one know if I can get the geometry node component from a VRML
>SceneGraphObject and hence can
>change the geometry of that object dynamically?
>
If you've loaded the object through the loader interface then you can
use the getNamedObject method on the scene.  This will work for any
object DEFed in the scenegraph.

Scene scene = vrmlLoader.load(location);
scene.getNamedObject("myNode");

if (scene instanceof GeometryArray) {
    // play with the object here
}

You will definately need to be careful here.  If this is a live scene,
ie you have ROUTES or scripting running in the scene then you really
shouldn't mess with the J3D representation.  But if its a static scene
then you can rip apart the object as desired.


--
Alan Hudson
President: Yumetech, Inc.                      http://www.yumetech.com/
Web3D Open Source Chair        http://www.web3d.org/TaskGroups/source/

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