Re: Gridded2DSet problem AND Re: Display problem

> The four sided geometry(a square) is set as
> attachment. We are facing these problems.
>
> 1. When we drag a point(say 1) the real tuple is
> moving and the lines 0_1' and 2_1' are drawn and the
> point is shifted from 1 to 1'. next time when we move
> the points (say2) the lines are drawn from 1_2' to
> 3_2' instead of 1'_2' incase of 1_2'. This is the same
> case with all the other points.

Inside the CellImpl you need to recompute your UnionSet
from the four RealTuples that you get from dr[0].getData(),
dr[1].getData(), dr[2].getData() and dr[3].getData().

> 2. All the lines are drawn using the Gridded2DSets.
> When the tuple is moved the adjacent lines are drawn
> but the previous lines are also visible. We want to
> remove the old lines and the new lines should be
> visible. please suggest about these issues.

This problem occurs because you have two DataReferences
data_ref1 and dt, both to UnionSets, and you are calling:

  dt.setData(u_set);

outside of your CellImpl. You need to just use data_ref1,
with its call to data_ref1.setData(us) inside the
CellImpl.doAction() method.

> We are able to get the position of the mouse click
> using PointManipulationRendererJ3D. We want to display
> a tuple at the place of a mouse click and when we set
> the data to the reference of the
> PointManipulationRenderer the point is not displayed
> .But if added to a new reference the point is
> displayed only at the edges. Please, suggest us in
> achieving this.

Your code basically works for me. The problem may only be
that the point display is obscured by the field display.
You may only need a ConstantMap to PointSize in the
addReference() call for d_ref. Also, do not call
display.addReference(d_ref) inside your displayChanged()
method. Rather, call it once in your set-up code.

Good luck,
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


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