Lee,

I'm assuming that the VRML loader gives you a BranchGroup with some Shape3D
instance for your scene. At runtime you need to traverse the BranchGroup and
find the correct Shape3D (you may also be able to grab Shape3D instances by
name).

You can then call getGeometry on the Shape3D and cast it to the correct
sub-class of Geometry. Once you have the Geometry you can use the getters
and setters to modify the coordinates to enlarge the hole. You will need to
set the correct read/write capability bits first...

I have a book example which loads a Vrml file and sets some attributes on
the sub-parts of the model.

J3dTree is very useful for visually inspecting BranchGroups and finding the
sub-part that you need. Either grab the source from my book
(http://manning.com/selman or download it from http://www.tornadolabs.com)

Good luck!

Daniel Selman

-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Lee Zhou
Sent: Tuesday, March 05, 2002 12:06 PM
To: [EMAIL PROTECTED]
Subject: dynamically change a hole size inside a VRML object


-Hi, all,

I have a 3D part that has a hole in the a round disc of that part.  The
part is created with TrueSpace and saved
as a VRML file.  If I load that VRML file and make it live at runtime, is
there any method
like getGeometryInfo() or so in some SceneGraphObject's behavior?  Briefly
speaking, I want to dynamically change the
diameter of the hole in the round disc of that part at runtime, eventhough
that object was reconstructed from VRML
format, can I do it?  If so, how could I do it?

Your teaching would be greatly appreciated!

Lee

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