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

void NECOutput::calculateInsideTriangles (  )  [private]

The inside triangles calcs.

FIXME calculate the normals accordingly

FIXME calculate the normals accordingly

Definition at line 527 of file necoutput.cpp.

References alpha, calculateColors(), CalculateXYZ(), insideTrianglesColorArray, insideTrianglesNormalArray, insideTrianglesVertexArray, and phiStartList.

Referenced by ProcessData().

{
      double x = 0;
      double y = 0;
      double z = 0;
      double R = 0;
      double red = 0;
      double green = 0;
      double blue = 0;

      for(int i=0; i<phiStartList.size()-1; i++)
            for(int j=0; j<(phiStartList.at(2)-phiStartList.at(1)); j++)
            {
                  CalculateXYZ(j+phiStartList.at(i),x,y,z,R);
                  calculateColors(j+phiStartList.at(i),R,red,green,blue);

                  // Vertex
                  insideTrianglesVertexArray.append(x);
                  insideTrianglesVertexArray.append(y);
                  insideTrianglesVertexArray.append(z);
                  insideTrianglesVertexArray.append(0.0);
                  insideTrianglesVertexArray.append(0.0);
                  insideTrianglesVertexArray.append(0.0);

                  // Colours
                  insideTrianglesColorArray.append(red);
                  insideTrianglesColorArray.append(green);
                  insideTrianglesColorArray.append(blue);
                  insideTrianglesColorArray.append(alpha);
                  insideTrianglesColorArray.append(red);
                  insideTrianglesColorArray.append(green);
                  insideTrianglesColorArray.append(blue);
                  insideTrianglesColorArray.append(alpha);

                  /// FIXME calculate the normals accordingly
                  insideTrianglesNormalArray.append(1.0);
                  insideTrianglesNormalArray.append(0.0);
                  insideTrianglesNormalArray.append(0.0);
                  insideTrianglesNormalArray.append(1.0);
                  insideTrianglesNormalArray.append(0.0);
                  insideTrianglesNormalArray.append(0.0);
            }
      /*
            The other way. We check that there has been values added to the list,
            or we will have a segfault. Note that at least one value is incorpored
            in ProcessData(), so we must check if there at least are more than one.
      */
      if(phiStartList.size() > 1)
      {
            for(int j=0; j<(phiStartList.at(2)-phiStartList.at(1)); j++)
                  for(int i=0; i<phiStartList.size(); i++)
                  {
                        CalculateXYZ(j+phiStartList.at(i),x,y,z,R);
                        calculateColors(j+phiStartList.at(i),R,red,green,blue);

                        // Vertex
                        insideTrianglesVertexArray.append(x);
                        insideTrianglesVertexArray.append(y);
                        insideTrianglesVertexArray.append(z);
                        insideTrianglesVertexArray.append(0.0);
                        insideTrianglesVertexArray.append(0.0);
                        insideTrianglesVertexArray.append(0.0);

                        // Colours
                        insideTrianglesColorArray.append(red);
                        insideTrianglesColorArray.append(green);
                        insideTrianglesColorArray.append(blue);
                        insideTrianglesColorArray.append(alpha);
                        insideTrianglesColorArray.append(red);
                        insideTrianglesColorArray.append(green);
                        insideTrianglesColorArray.append(blue);
                        insideTrianglesColorArray.append(alpha);

                        /// FIXME calculate the normals accordingly
                        insideTrianglesNormalArray.append(1.0);
                        insideTrianglesNormalArray.append(0.0);
                        insideTrianglesNormalArray.append(0.0);
                        insideTrianglesNormalArray.append(1.0);
                        insideTrianglesNormalArray.append(0.0);
                        insideTrianglesNormalArray.append(0.0);
                  }
      }
}


Generated by  Doxygen 1.6.0   Back to index