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".

Reply via email to