Jonathan,
You need to modify the Appearance NodeComponent. Only Shape3D derived Nodes
have an Appearance attribute. BranchGroups are just logical groups
(containers) for a collection of children.
You can use the getChild method on a BranchGroup to return your Shape3D
nodes (TriangleArrays probably), and then modify the Appearance attribute
for each.
If you are not sure what the loader is returning, use J3dTree to analyze the
structure of your scenegraph to ensure you cast to the correct types.
Sincerely,
Daniel Selman
[EMAIL PROTECTED]
Tornado Labs Ltd.
http://www.tornadolabs.com
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Jonathan Singer
Sent: Friday, March 31, 2000 12:49 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Adding Appearance to BranchGroup
Hello All,
I am using the ncsa loaders to load various 3D objects into a Universe.
So far I am able to extract the BranchGroup from the loader's Scene and
manipulate the position, scale, and rotation of the 3D object. However,
I would also like to change the object's Material and Appearance. After
looking through other documentation and examples I haven't found any
useful solutions yet. I have experimented using Shape3D but so far it
only likes primitive shapes and not the object Nodes I've been feeding
it.
I don't know if it possible to extract the Geometry from a BranchGroup
but I think it would be a great tool.
I am fairly new at Java3D and this interest group. I hope that someone
has a solution or can point me in the right direction.
Thank you
Jon
===========================================================================
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".