Hi,

Thanks for people responsing to the question I have.

The solution to achieve this objective is described
as follows.

1. Transform the point from 2D image space to
   3D space as posted.
2. Create a Appearance which should disable lighting
   and depth test.
3. Using immediate mode rendering after postRender().

This seems to be working very nicely.


--Scott


--- Scott Hong <[EMAIL PROTECTED]> wrote:

> I tried to use J3Dgraphics2D to draw lines using
> a callback function after Canvas3D's postRender()
> function. The J3Dgraphics2D is too slow to be
> useful.
>
> When using OrderedGroup as suggested, it is still
> not behaving as what I wanted it to be.
>
> I haven't tried PlatformGeometry approach yet.
>
> I am thinking of using immediate mode rendering
> to draw the geometry after postRender() to
> be able to make sure that the ojbect get rendered
> at the end of the pipeline.
>
> By the way, does anyone can point me to any example
> that can help project the Point3D to the front
> clipping plane?
>
>
> -- Scott
>
> --
>
>
>
> --- Alessandro Borges
> <[EMAIL PROTECTED]>
> wrote:
>
> > Another option is to set your geometry into you
> > PlatformGeometry. So it will
> > move alongside your câmera. Nice for HUD.
> > See the java3d demo at:
> >
>
${JAVA_HOME}/demo/java3d/PlatformGeometry/SimpleGeometry.java
> >
> > Alessandro
> >
> >
> >  --- Mike Pilone <[EMAIL PROTECTED]> escreveu:
> > > Scott,
> > >
> > > You have a couple of options. You could draw on
> > the J3Dgraphics2D object in
> > > a Canvas call back. This would probably be the
> > simplest approach, but there
> > > are a few outstanding bugs with J3Dgraphics2D.
> > >
> > > Another option would be to use an OrderedGroup
> and
> > simple line geometry in
> > > the scene, and disable depth testing for the
> > lines. This can get tricky
> > > because you will need to project the points into
> > the scene to get them
> > > infront of your front clipping plane.
> > >
> > > Another option is to use one of the publicly
> > available HUD packages, or roll
> > > your own. The trick is to use a texture mounted
> on
> > the view side of the
> > > scenegraph and update the image on the texture.
> I
> > think this is what
> > > J3Dgraphics2D is doing for you in the
> background.
> > >
> > > -mike
> > >
> > >
> > > -----Original Message-----
> > > From: Discussion list for Java 3D API
> > [mailto:[EMAIL PROTECTED]
> > > On Behalf Of Scott Hong
> > > Sent: Thursday, August 05, 2004 8:56 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [JAVA3D] How to draw lines that are
> > always on top of Canvas3D
> > >
> > > Hi,
> > >
> > > I am trying to draw lines that are always
> > displayed on
> > >
> > > top of Canvas3D. The lines should be visible no
> > matter
> > > what objects are in the SceneGraph.
> > >
> > > Here is the code used to get the point from
> image
> > > space(x, y) to 3D space (Point3d).  In order to
> > draw
> > > lines that appear on top of Canvas3D, the points
> > must
> > > be further projected to the near clipping plane
> to
> > be
> > > able to achieve the objective.
> > >
> > > Is there better or easier way to do this?
> > >
> > > Thanks!
> > >
> > > -- Scott
> > >
> >
> ---------------------------------------------------
> > >     public Point3d getWorldCoordinate(Canvas3D
> > canvas,
> > > int x, int y ) {
> > >
> > >        Canvas3D canvas;
> > >        Transform3D ipToVworld = new
> Transform3D();
> > >        Point3d point = new Point3d();
> > >         //get the transformation
> > >
> canvas.getImagePlateToVworld(ipToVworld);
> > >         canvas.getPixelLocationInImagePlate( x,
> y,
> > > point );
> > >         //Get coordinate in world coordinate
> > system.
> > >         ipToVworld.transform(point );
> > >
> > >        return point;
> > >     }
> > >
> >
> ----------------------------------------------------
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Y! Messenger - Communicate in real time.
> Download
> > now.
> > > http://messenger.yahoo.com
> > >
> > >
> >
>
===========================================================================
> > > 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".
> > >
> > >
> >
>
===========================================================================
> > > 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".
> > >
> >
> >
> >
> >
> >
> >
>
_______________________________________________________
> > Yahoo! Acesso Grátis - navegue de graça com
> conexão
> > de qualidade! Acesse: http://br.acesso.yahoo.com/
> >
> >
>
===========================================================================
> > 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".
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
>
===========================================================================
> 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".
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

===========================================================================
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