Gl. glLineWidth(5.0f);

                       Gl. glBegin(Gl. GL_LINE_STRIP);

                       for (int i = 0; i < length; i++)

                       {

                               Gl. glVertex3f(x[i] , y[i], z[i]);

                       }

                       Gl. glEnd();

                       Gl. glEndList();

                       //отклонение

                       DisplayListNomDev = Gl. glGenLists(1);

                       Gl. glNewList(DisplayListNomDev, Gl. GL_COMPILE);

                       Gl. glLineWidth(3.0f);

                       Gl. glBegin(Gl. GL_LINES);

                       for (int i = 0; i < length; i++)

НЕ нашли? Не то? Что вы ищете?

                       {

                               Gl. glColor3f(deviation[i] / maxDeviation, deviation[i] / maxDeviation, deviation[i] / maxDeviation);

                               Gl. glVertex3f((float)data[i].x, (float)data[i].y - 1, (float)data[i].z);

                               Gl. glColor3f(0.0f, 0.0f, 0.0f);

                               Gl. glVertex3f(x[i], y[i], z[i]);

                       }

                       Gl. glEnd();

                       Gl. glEndList();

                       flag = true;

               }

               public void Render(bool blGLide, bool blDev, bool blScale, float transparency)

               {

                       if (flag == false)

                       {

                               this. Calculate();

                               flag = true;

                       }

                       if (blGLide)

                       {

                               Gl. glCallList(DisplayListNomGlide);

                       }

                       if (blDev)

                       {

                               Gl. glCallList(DisplayListNomDev);

                       }

                       if (blScale)

                       {

                               Gl. glBlendFunc(Gl. GL_SRC_ALPHA, Gl. GL_ONE_MINUS_SRC_ALPHA);

                               Gl. glEnable(Gl. GL_ALPHA_TEST);

                               Gl. glEnable(Gl. GL_BLEND);

                               Gl. glFrontFace(Gl. GL_CW);

                               Gl. glBegin(Gl. GL_TRIANGLES);

                               Gl. glColor4f(0.0f, 0.5f, 0, transparency);

                               Gl. glVertex3f(x[0], y[0], -500.0f);

                               Gl. glVertex3f(x[0], y[0], 500.0f);

                               Gl. glVertex3f(0, y[length - 1], 0.0f);

                               Gl. glColor4f(0.0f, 0.0f, 0.5f, transparency);

                               Gl. glVertex3f(x[0] , y[0] + 400.0f, 0.0f);

                               Gl. glVertex3f(x[0] , y[0] - 400.0f, 0.0f);

                               Gl. glVertex3f(0, y[length - 1], 0.0f);

                               Gl. glEnd();

                               Gl. glFrontFace(Gl. GL_CCW);

                               Gl. glBegin(Gl. GL_TRIANGLES);

                               Gl. glColor4f(0.0f, 0.5f, 0, transparency);

                               Gl. glVertex3f(x[0] , y[0], -500.0f);

                               Gl. glVertex3f(x[0] , y[0], 500.0f);

                               Gl. glVertex3f(0, y[length - 1], 0.0f);

                               Gl. glColor4f(0.0f, 0.0f, 0.5f, transparency);

                               Gl. glVertex3f(x[0], y[0] + 400.0f, 0.0f);

                               Gl. glVertex3f(x[0], y[0] - 400.0f, 0.0f);

                               Gl. glVertex3f(0, y[length - 1], 0.0f);

                               Gl. glEnd();

                               Gl. glDisable(Gl. GL_BLEND);

                               Gl. glDisable(Gl. GL_ALPHA_TEST);

                       }

               }

       }

}

class Entity

using System;

using System. Collections. Generic;

using Tao. OpenGl;

namespace Самолет

{

       public class MaterialFaces

       {

               public Material Material;

               public ushort[] Faces;

       }

       

       public class Entity : IRenderable

       {

               int glListNo = -1;

               List<MaterialFaces> materialFaces = new List<MaterialFaces>();

               public Vector[] vertices;

               public Vector[] normals;

               public Triangle[] indices;

               public TexCoord[] texcoords;

               bool normalized = false;

               public List<MaterialFaces> MaterialFaces {

                                       get {

Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21