Re: Mapping Problems

Hi Bill,

Thanks for your efforts. I looked into your code and could not find any
problem. But when I changed the
RealType range = new RealType("range");
to
RealType range = RealType.Altitude;
and the
display.addMap(new ScalarMap(range, Display.Green));
to
display.addMap(new ScalarMap(range, Display.ZAxis));
and changed the DisplayImplJ2D into a DisplayImplJ3D I get obviously wrong
results. Please look into the attached code.
I need the ConstantMaps to fix the Handle-Positions along the x-/y-Axis:

    Real[] slider = new Real[3];
    slider[0] = new Real(realTypes[2], ranges[2][0]);
    slider[1] = new Real(realTypes[2], ranges[2][0]);
    slider[2] = new Real(realTypes[2], ranges[2][0]);
    values[0] = ranges[2][0];
    values[1] = ranges[2][0];
    values[2] = ranges[2][0];
    values[3] = ranges[2][0];
    sliderReference = new DataReferenceImpl[3];
    sliderReference[0] = new DataReferenceImpl("slider0");
    sliderReference[1] = new DataReferenceImpl("slider1");
    sliderReference[2] = new DataReferenceImpl("slider2");
    ConstantMap[][] maps = new ConstantMap[3][6];
    maps[0][0] = new ConstantMap(1.0, Display.Red);
    maps[0][1] = new ConstantMap(0.0, Display.Green);
    maps[0][2] = new ConstantMap(0.0, Display.Blue);
    maps[0][3] = new ConstantMap(10.0, Display.PointSize);
    maps[0][4] = new ConstantMap(-1.0, axes[0]);
    maps[0][5] = new ConstantMap(-1.0, axes[1]);
    maps[1][0] = new ConstantMap(0.0, Display.Red);
    maps[1][1] = new ConstantMap(0.0, Display.Green);
    maps[1][2] = new ConstantMap(1.0, Display.Blue);
    maps[1][3] = new ConstantMap(10.0, Display.PointSize);
    maps[1][4] = new ConstantMap(1.0, axes[0]);
    maps[1][5] = new ConstantMap(-1.0, axes[1]);
    maps[2][0] = new ConstantMap(0.0, Display.Red);
    maps[2][1] = new ConstantMap(0.0, Display.Green);
    maps[2][2] = new ConstantMap(1.0, Display.Blue);
    maps[2][3] = new ConstantMap(10.0, Display.PointSize);
    maps[2][4] = new ConstantMap(-1.0, axes[0]);
    maps[2][5] = new ConstantMap(1.0, axes[1]);
    sliderReference[0].setData(slider[0]);
    sliderReference[1].setData(slider[1]);
    sliderReference[2].setData(slider[2]);
    inputDisplay.addReferences(new DirectManipulationRendererJ3D(),
sliderReference[0], maps[0]);
    inputDisplay.addReferences(new DirectManipulationRendererJ3D(),
sliderReference[1], maps[1]);
    inputDisplay.addReferences(new DirectManipulationRendererJ3D(),
sliderReference[2], maps[2]);

Thanks, Mathias

Attachment: Junk.java
Description: Binary data

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