Logo Search packages:      
Sourcecode: qantenna version File versions  Download package

void NECInput::CreateOpenGLList (  )  [private]

Finally when all the structure geometry cards are processed, CreateOpenGLList draw the antenna.

Definition at line 800 of file necinput.cpp.

References groundPlane, linesColorArray, linesVertexArray, primitiveList, quad, quadsColorArray, quadsVertexArray, radiatingElement, Transformate(), trianglesColorArray, and trianglesVertexArray.

Referenced by ProcessPrimitive().

{
      GLUquadricObj *quad;
      QVector<double> temp;

      // We clean the arrays
      linesVertexArray.clear();
      linesColorArray.clear();
      quadsVertexArray.clear();
      quadsColorArray.clear();
      trianglesVertexArray.clear();
      trianglesColorArray.clear();

      for(int i=0; i<primitiveList.size(); i++)
      {
            if(primitiveList.at(i)->GetLabel()=="GW")
            {
                  if (primitiveList.at(i)->GetTagNumber()==radiatingElement)
                  {
                        for(int j=0; j<2; j++)
                        {
                              linesColorArray.append(1.0);
                              linesColorArray.append(0.0);
                              linesColorArray.append(0.0);
                              linesColorArray.append(0.0);
                        }
                  }
                  else
                  {
                        for(int j=0; j<2; j++)
                        {
                              linesColorArray.append(0.5);
                              linesColorArray.append(0.0);
                              linesColorArray.append(0.5);
                              linesColorArray.append(1.0);
                        }
                  }

                  temp = primitiveList.at(i)->GetEnd1();
                  Transformate(temp);
                  linesVertexArray.append(temp.at(0));
                  linesVertexArray.append(temp.at(1));
                  linesVertexArray.append(temp.at(2));

                  temp = primitiveList.at(i)->GetEnd2();
                  Transformate(temp);
                  linesVertexArray.append(temp.at(0));
                  linesVertexArray.append(temp.at(1));
                  linesVertexArray.append(temp.at(2));
            }
            else if(primitiveList.at(i)->GetLabel()=="SP")
            {
                  if(primitiveList.at(i)->GetCardParameter()==2)
                  {
                        // We give the colours
                        for(int j=0; j<3; j++)
                        {
                              trianglesColorArray.append(0.5);
                              trianglesColorArray.append(0.5);
                              trianglesColorArray.append(0.5);
                              trianglesColorArray.append(1.0);
                        }

                        temp = primitiveList.at(i)->GetEnd1();
                        Transformate(temp);
                        trianglesVertexArray.append(temp.at(0));
                        trianglesVertexArray.append(temp.at(1));
                        trianglesVertexArray.append(temp.at(2));

                        temp = primitiveList.at(i)->GetEnd2();
                        Transformate(temp);
                        trianglesVertexArray.append(temp.at(0));
                        trianglesVertexArray.append(temp.at(1));
                        trianglesVertexArray.append(temp.at(2));

                        temp = ((Patch*)primitiveList.at(i))->GetEnd3();
                        Transformate(temp);
                        trianglesVertexArray.append(temp.at(0));
                        trianglesVertexArray.append(temp.at(1));
                        trianglesVertexArray.append(temp.at(2));
                  }
                  else
                  {
                        // We give the colors
                        for(int j=0; j<4; j++)
                        {
                              quadsColorArray.append(1.0);
                              quadsColorArray.append(1.0);
                              quadsColorArray.append(1.0);
                              quadsColorArray.append(1.0);
                        }

                        temp = primitiveList.at(i)->GetEnd1();
                        Transformate(temp);
                        quadsVertexArray.append(temp.at(0));
                        quadsVertexArray.append(temp.at(1));
                        quadsVertexArray.append(temp.at(2));

                        temp = primitiveList.at(i)->GetEnd2();
                        Transformate(temp);
                        quadsVertexArray.append(temp.at(0));
                        quadsVertexArray.append(temp.at(1));
                        quadsVertexArray.append(temp.at(2));

                        temp = ((Patch*)primitiveList.at(i))->GetEnd3();
                        Transformate(temp);
                        quadsVertexArray.append(temp.at(0));
                        quadsVertexArray.append(temp.at(1));
                        quadsVertexArray.append(temp.at(2));

                        temp = ((Patch*)primitiveList.at(i))->GetEnd4();
                        Transformate(temp);
                        quadsVertexArray.append(temp.at(0));
                        quadsVertexArray.append(temp.at(1));
                        quadsVertexArray.append(temp.at(2));
                  }
            }
      }
      if(groundPlane)
      {
            quad = gluNewQuadric();
            glPushMatrix();
            glColor3f(0.78, 0.96, 1);
            glRotatef( 90, 1, 0, 0);
            // In radius, out radius, slices and loops.
            gluDisk( quad, 0, 1.5, 30, 15);
            glPopMatrix();
      }
      glEndList();
}


Generated by  Doxygen 1.6.0   Back to index