Re: Does Performer support the "Basics"

New Message Reply Date view Thread view Subject view Author view

Bela_A_Kekesi_at_2-HACHQ3++at++CCGATE.HAC.COM
Fri, 20 Sep 96 10:03:50 PST


     Hi,
      
     Recently I've encountered a similar problem with one of the projects I
     have been working on. I'm sure there are many different ways of doing
     this, but my solution was to do an OpenGL postdraw callback. I'm not
     sure if you need something to produce a path, or just lines that might
     indicate wind-sheer or something off your aircraft, but you should be
     able to do either.
      
     If you just want to draw a single 3D line, the code would be something
     like:
      
     #include <GL/gl.h>
     #include <GL/glu.h>
      
     #definedrawOneLine(x1, y1, x2, y2) glBegin(GL_LINES);\
        glVertex2f((x1), (y1)); glVertex2f((x2), (y2)); glEnd();
      
     glColor(0.0, 0.0, 0.0); /* Set the RGB color you want */
      
     {Get the coordinates for line - based off your wing tips}
      
     drawOneLine(x1, y1, x2, y2);
      
      
And to create a string of polylines for a path, just replace glBegin(GL_LINES)
with glBegin(GL_LINE_STRIP) and add vertices to the first line segment as the
wing-tips make the path.

This psuedo-code primarily comes from the _OpenGL_Programming_Guide_ (Jackie
Neider, Tom Davis, Mason Woo; pp.19-62) if you want more information.

Hope this helps!

Alex Kekesi
Hughes Aircraft

______________________________ Reply Separator _________________________________
Subject: Does Performer support the "Basics"
Author: bgus++at++cts.com (Bob Gustafson) at CCGATE
Date: 9/19/96 12:51 PM

Hi,
      
I've been doing this graphics thing for several years, but I can't for the life
of me figure out how to draw
a couple of polylines extending out from the wingtip of an aircraft. We use
this method (in other systems)
to indicate wing trails. How do I draw a couple of simple polylines attached to
my aircraft image???
      
Another question related to "basics". Is there any way to attach a 2D character
string, again to an
aircraft? Right now, we are using a 3D pfString for displaying an aircraft
number next to the aircraft's
image but unless the orientation of the number is continually updated, it can
become unreadable
(upside-down, backwards...) a 2D number won't have this problem. So, the
question is: how to "attach" a 2D
number (charstr) to a 3D performer aircraft image.
      
Please feel free to answer either or both of these questions. And as always, a
good example "paints a
thousand words".
      
Thank You
      
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|
----------------------------------------|
|
Curt Bryan |
Delphi Research, Inc. |
3954 Murphy Canyon Road Suite D-201 |
San Diego, CA 92123 |
|
Voice: (619) 694-1314 |
Fax: (619) 694-1356 |
|
E-mail: bgus++at++cts.com |
-----------------------------------------
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:35 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.