Why not using Overlays?? (From j3d) everything is there for free; you can
implement any kind of 2D overlay very easily. I'm sure it will fit your
needs

http://code.j3d.org/

Franck

PS: you can check my overlay implementation at:

http://www.geocities.com/calzada_us/Billard3D/Pool.html
<http://www.geocities.com/calzada_us/Billard3D/Pool.html> 


                -----Original Message-----
                From: Discussion list for Java 3D API
<[EMAIL PROTECTED]>@SUNGARD On Behalf Of Scott Hong
<[EMAIL PROTECTED]>
                Sent: Thursday, August 05, 2004 5:36 PM
                To: [EMAIL PROTECTED]
                Subject: Re: [JAVA3D] How to draw lines that are always on
top of Canvas3D

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




Confidentiality Notice: This email and any files transmitted with it are
confidential and are intended solely for the use of the individual or entity
to whom they are addressed. If you are not the original recipient or the
person responsible for delivering the email to the intended recipient, be
advised that you have received this email in error, and that any use,
dissemination, forwarding, printing, or copying of this email is strictly
prohibited. If you received this email in error, please notify the
originator immediately.

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