C++ (Qt)struct LayerInfo{ QVector<VectorisedPolyLine> m_Polygons; QVector<VectorisedPolyLine> m_PolyLines; QVector<smallPoint> m_Points;}; struct VectorisedPolyLine{ QVector<smallPoint> m_Points; int iColor; float Hrel; float Habs;};struct smallPoint{ double m_B; double m_L; double m_H; int iColor;};
C++ (Qt) LayerInfo LIResult; VectorisedPolyLine vPolyLine; for (int j = 1; j <= iPointCount; j++) { smallPoint spCur; spCur.m_B = mapXPlane(curObj, j, 0); spCur.m_L = mapYPlane(curObj, j, 0); if (vPolyLine.m_Points.resize(j+1)) vPolyLine.m_Points.insert(j-1,&spCur); } if ( LIResult.m_PolyLines.resize((int)LIResult.m_PolyLines.count()+1)) { LIResult.m_PolyLines.insert((int)LIResult.m_PolyLines.count()-1,&vPolyLine); continue;} else {return -1;}
C++ (Qt)vPolyLine.m_Points.resize(j+1)
C++ (Qt) if ( LIResult.m_PolyLines.resize((int)LIResult.m_PolyLines.count()+1)) { LIResult.m_PolyLines.insert((int)LIResult.m_PolyLines.count()-1,&vPolyLine); continue;} else {return -1;}