NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi Sunila, > I want to create a geometry something like this. > > when user presses the right mouse button, a point at that location should be > added to the display and from that point I want to have a something like > RubberBandLineRendererJ3D effect and when user releases the mouse button the > line should be displayed with the two end points shown of greater pixel > size. In this way i want to create a geometry by connecting some points on > the display. > After the creation of geometry, user can drag the points with the > mouse and new position of the points and the line connecting the points > should be redrawn on the display. You can catch the first click of the right mouse button with visad.bom.PointManipulationRendererJ3D. But to then drag to the second point would require you to write a new extension class of DirectManipulationRendererJ3D, similar to visad.bom.RubberBandBoxRendererJ3D. This would be challenging. Another approach is to create both end points with clicks and visad.bom.PointManipulationRendererJ3D. Then to allow the user to drag existing end points with visad.java3d.DirectManipulationRendererJ3D. Of course, this would also require other logic, in CellImpls that are triggered by PointManipulationRendererJ3D and DirectManipulationRendererJ3D. These CellImpls would construct RealTuples for the end points and Gridded2DSets with manifold dimension = 1 for the connecting line. 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
visad
archives: