Lecture Information

 Lecture Information

 

 

Visual C++

 

*In MATIES lab -> Password: Electrical

√ NASTRAN v. AutoCad; √ ARCVIEW (re GIS & assigning values to vertices)

 

*Visual C++ (for graphical purposes) -> constructs GUI

      ^

(case sensitive)

 

Build + prog.

Build + execute prog.

 

Start in C++

          Go to File

                    Choose C++ Source File

                             Choose location/Directory, e.g. C:/ New Folder

 

*Header Files w/ fncs

 

blue = compiler-redefined fnc

 

*Allows me to create my own fncs

 

OpenGL

 

Set up rectangle (w/ lines only)

void

glBegin(GL_LINE_LOOP)

                           x    y    z

          glVertex3f(    ,    , 0.0); // V0

          glVertex3f(    ,    , 0.0); // V1

          glVertex3f(    ,    , 0.0); // V2

          glVertex3f(    ,    , 0.0); // V3

glEnd();

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

 

 

 

 

OpenGL (cont.)

 

Line Width (how to establish)

 

void RenderScene(void)

          {

          GLfloat y;

          GLfloat fSizes [2];

          GLfloat fCurrSize;

          …

          …

          …

          glGetFloat√ (GL_LINE_WIDTH_RANGE, fSizes);

          fCurrSize = fSizes [0];

          //Set up x-axis 10 units @ a time

for (x = -90.0f; y < 90.0f, y+ = 10.0f

          {

          //Set the line width

          glLineWidth (fCurrSize);

 

          //Draw the line

          glBegin (GL_LINE_LOOP);

                    glVertex

          glEnd ();