NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Donna, > Hmmm, I'm still missing something. What I've got now is a class > UnshadedRenderJ3D, which has a bunch of things along the lines of > > public class UnshadedRendererJ3D extends DefaultRendererJ3D { > > public UnshadedRendererJ3D () { > super(); > } > public ShadowType makeShadowType( > FunctionType type, DataDisplayLink link, ShadowType parent) > throws VisADException, RemoteException { > return new ShadowUnshadedTypeJ3D(type, link, parent); > } > public ShadowType makeShadowFunctionType( > FunctionType type, DataDisplayLink link, ShadowType parent) > throws VisADException, RemoteException { > return new ShadowUnshadedFunctionTypeJ3D(type, link, parent); > } > ....... > > Then I have a new version of (non-static) makeAppearance, which I have > placed in ShadowUnshadedTypeJ3D. This version of makeAppearance does > something different with the lighting. But I'm never entering that method. > What else do I need to do? I previously had a bunch of makeAppearances also > in the other ShadowUnshaded.... guys, just referring back to the one in > ShadowUnshadedTypeJ3D, but the compiler complains about referencing a > non-static method from a static context... I'm not enough of a java expert > to sort this all out... Just to test this, I tried it myself, adding the method: public Appearance makeAppearance(GraphicsModeControl mode, TransparencyAttributes constant_alpha, ColoringAttributes constant_color, GeometryArray geometry, boolean no_material) { System.out.println("ShadowImageFunctionTypeJ3D.makeAppearance"); return super.makeAppearance(mode, constant_alpha, constant_color, geometry, no_material); } to visad/bom/ShadowImageFunctionTypeJ3D.java. Then I ran: doll% java visad.bom.ShadowImageFunctionTypeJ3D test.gif ShadowImageFunctionTypeJ3D.makeAppearance and as you see it did print the message that it was invoked. I suggest you compare your DataRenderer and ShadowTypes to: visad/bom/ImageRendererJ3D.java and: visad/bom/ShadowImageFunctionTypeJ3D.java and compare your code to these, with respect to what class extends what, etc. Good luck, Bill
visad
archives: