strange 3D to 2D behavior

I get strange behaviour when I try to add two
cones to the display.
The first cone shows up just fine, but when
the second cone is added, the display
shows the two cones parallel to the xy plane.
(This is with Bill's texture mapping fix;
With the release version of visad.jar, I get
an OutOfMemoryError)

http://www.nssl.noaa.gov/~lakshman/visad/3d_to_2d.html

The problem is probably in the way I am adding
the ElevationScans to the display (I'm clearing
out the data references, then re-adding them):

        display.removeAllReferences();
        display.clearMaps();
        display.addMap( new ScalarMap( dr.x, Display.XAxis ) );
        display.addMap( new ScalarMap( dr.y, Display.YAxis ) );
        display.addMap( new ScalarMap( dr.z, Display.ZAxis ) );

        for each drawable:
        {
            ScalarMap dataMap = new ScalarMap( gatevalue, 
Display.RGBA );
        dataMap.setRange( myColorFunction.min, myColorFunction.max );
        display.addMap( dataMap );

        // change the colormap from the default ...
        ColorAlphaControl color = (ColorAlphaControl) 
dataMap.getControl();
        color.setTable( myColorFunction.colorTable );
        }

       
        for each drawable{
            display.addReference( data );
        }


Is there a better way? Is what I am doing wrong?

thanks
Lak


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