Re: doing picking, and using a custom data renderer

Hi Donna,

As long as the picking and flat shading apply to different
Data objects, you can link them wit different DataRenderers.

If they are the same Data, you might be able to make your
flat shading DataRenderer extend PickManipulationRendererJ3D,
building your custom ShadowTypeJ3D's with their makeAppearance()
over-ride, since PickManipulationRendererJ3D just uses the
default ShadowTypeJ3D's.

Good luck,
Bill

Donna L Gresh wrote:
> 
> Somehow it always seems like I'm trying to do something one step beyond
> what I can find in the documentation :-)
> 
> I have successfully implemented picking in my 3D displays, and I've also
> successfully turned off shading by writing a custom data renderer. Thanks
> to all for help in getting those working. What I want to do now is both at
> the same time, but I'm not sure how to go about it. For the picking I do
> something like
> 
>        final PickManipulationRendererJ3D pmr = new
> PickManipulationRendererJ3D();
>        theDisplay.addReferences(pmr,theFlatFieldRef);
>        CellImpl cell = new CellImpl() {
>        public void doAction() throws VisADException, RemoteException {
>              do something using pmr....
>            }
>       };
>       cell.addReference(theFlatFieldRef);
> 
> While for my flat shading I do something along the lines of
>        theDisplay.addReferences(new UnshadedRendererJ3D(),theFlatFieldRef);
> 
> However, how do I do both at the same time, since it seems that I can have
> only one Renderer associated with theDisplay (is this correct?)
> 
> 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, 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: