The VisAD library uses Java3D for graphics and includes a general rubber
band box class
visad.bom.RubberBandBoxRendererJ3D.  This allows the user to drag a 2-D
box embedded
on any 2-D submanifold in 3-D (typically a plane, but could be the
surface of a sphere, etc).
When the user releases the mouse button, it can trigger a listener with
the coordinates of
pposite corners of the box.

The system also includes a method DelaunayCustom.inside() that can be
used to determine
whether a point is inside a 2-D path (such as the perimeter of the box).

VisAD is freely available including source at:

  http://www.ssec.wisc.edu/~billh/visad.html

Cheers,
Bill Hibbard
[EMAIL PROTECTED]

 Karhunen wrote:

> Hi all.I have to implement geometry picking using a "rubber band",
> that is, where you draw a (2d) shape on the viewport and underlaying
> shapes will be picked.Now the problem is that 2D rendering on Canvas3D
> is horribly slow, so using J3DGraphics2D doesn't work.I've tried some
> other approaches too (drawing a 3D polygon, mouse control gets pretty
> difficult because of perspective projection and the fact that front
> clip distance is greater than zero) , but this is pretty basic stuff
> (as is 2D rendering on top of 3D view!)and i'm sure someone has done
> it.I actually found a rubber band example from the Java3D interest
> archives, but it didn't work, it used a LineArray and Immediate mode,
> but nothing got drawn.So if anybody has ideas, examples or
> implementations, they would be appreciated.thanks.Tero Karhunen

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to