Why is nothing simple???

I define MySphere as an extension of Sphere.
I add it to my scene graph.

     MySphere theSphere = new MySphere();
     theSphere.setAppearance(createAppearanceProton());
     theSphere.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
     theSphere.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
     objPSize.addChild(theSphere);

Note the ALLOW_APPEARANCE_READ capability....

After the scene is compiled and active, I want to change the sphere's
color.  So I get the appearance of the sphere by

     Appearance PA = theApp.theSphere.getAppearance();
     Material theMaterial = PA.getMaterial();
     theMaterial.setDiffuseColor(red, green, blue);

But this fails with a
"Shape3D: no capability to get appearance"
exception.

So how do you set the capability to read (and write) the
appearance of a Sphere object?  Or is there some other
problem which is preventing me from doing this?

Bob Gray

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