How to draw interactive contours

This is a multipart message in MIME format.
--=_alternative 004B9085C1256B27_
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"

Hello,
my purpose is to plot some set of points on a 3D display, and once the=20
scene is rendered, to interactively draw some contours around some=20
interesting area, with the mouse. At the present time, I'm able to get the

coordinate mouse, to display some set of cross shapes, to draw lines=20
between these shapes. But I was not able to make theses shapes moveable=20
with, for example, the use of DirectManipulationRendererJ3D.

* The first solution I tried was to addReference, after the initial scene=20
is rendered. The code looks like:

private void makeVisibleCrossShape (double dx, double dy) throws=20
VisADException, RemoteException {
    // a cross is displayed at the current mouse coordinate
    RealTuple point=5Fcoord=5Ftuple =3D new RealTuple (xyzshapeType, new=20
double[] {dx, dy, 0, 0});
    DataReferenceImpl point=5Fref =3D new DataReferenceImpl ("pointRef" +=20
pointCount);
    point=5Fref.setData (point=5Fcoord=5Ftuple);

    // interactive behavior added
    DirectManipulationRendererJ3D point=5Fhandler =3D new=20
DirectManipulationRendererJ3D ();
    dpy.addReferences (point=5Fhandler, point=5Fref, pointColor);

    System.out.println ("new cross in (" + dx + ", " + dy + ")");
    pointCount++;
}=20

The reason why it doesn't work is probably that I don't have the right to=20
use addReference, once the scene has been displayed. Is it correct ?

* The second solution, I had in mind, was to create a DataReferenceImpl,=20
before the scene is rendered, that contains an array of cross shapes=20
coordinates. By extending this array, I could add some shapes on the=20
display. Something like:
(Gridded1DSet) -> (x, y, z, shape}
But as soon as I add a DirectManipulationRendererJ3D to display this=20
reference, nothing appears (while with a classic Display#addreference=20
call, everything is normally displayed).


Any help on this topic ?

Renaud DA=CFAN
--=_alternative 004B9085C1256B27_
Content-Transfer-Encoding: quoted-printable


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