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.

Re: controlling shading




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

Donna L. Gresh, Ph.D.
IBM T.J. Watson Research Center
(914) 945-2472
http://www.research.ibm.com/people/g/donnagresh
gresh@xxxxxxxxxx




                                                                                
                                                       
                      Bill Hibbard                                              
                                                       
                      <billh@xxxxxxxxxxxx        To:       Donna L 
Gresh/Watson/IBM@IBMUS                                              
                      u>                         cc:       Tom Rink 
<rink@xxxxxxxxxxxxx>, <visad-list@xxxxxxxxxxxxx>                   
                      Sent by:                   Subject:  Re: controlling 
shading                                                     
                      owner-visad-list@ss                                       
                                                       
                      ec.wisc.edu                                               
                                                       
                                                                                
                                                       
                                                                                
                                                       
                      01/26/2003 05:03 PM                                       
                                                       
                                                                                
                                                       




Hi Donna,

> Yes, I'm doing that. In fact my breakpoint in the constructor for
> UnshadedRenderJ3D is getting called, as are the breakpoints for all the
> constructors for the ShadowUnshaded*****

> It's the breakpoint in makeAppearance that's never getting hit....

I screwed up when I told you to override ShadowTypeJ3D.makeAppearance(),
because it turns out to be static and cannot be overridden.

I made a not-very-well-tested change, so makeAppearance() is
no longer static (now there is an equivalent static method
named staticMakeAppearance()). Its in the *.jar files at:

  ftp://ftp.ssec.wisc.edu/pub/visad-2.0/untested/

Please let us know if you still have problems.

Cheers,
Bill
----------------------------------------------------------
Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738
http://www.ssec.wisc.edu/~billh/vis.html




  • 2003 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: