OctahedronPolygon.cpp   OctahedronPolygon.cpp 
skipping to change at line 60 skipping to change at line 60
out << v.vertex << v.edgeFlag; out << v.vertex << v.edgeFlag;
return out; return out;
} }
QDataStream& operator>>(QDataStream& in, EdgeVertex& v) QDataStream& operator>>(QDataStream& in, EdgeVertex& v)
{ {
in >> v.vertex >> v.edgeFlag; in >> v.vertex >> v.edgeFlag;
return in; return in;
} }
SubContour::SubContour(const QVector<Vec3d>& vertices, bool closed) : QVect
or<EdgeVertex>(vertices.size(), EdgeVertex(true))
{
// Create the contour list by adding the matching edge flags
for (int i=0;i<vertices.size();++i)
(*this)[i].vertex = vertices.at(i);
if (closed==false)
{
this->first().edgeFlag=false;
this->last().edgeFlag=false;
}
}
SubContour SubContour::reversed() const
{
SubContour res;
QVectorIterator<EdgeVertex> iter(*this);
iter.toBack();
while (iter.hasPrevious())
res.append(iter.previous());
return res;
}
QString SubContour::toJSON() const QString SubContour::toJSON() const
{ {
QString res("["); QString res("[");
double ra, dec; double ra, dec;
foreach (const EdgeVertex& v, *this) foreach (const EdgeVertex& v, *this)
{ {
//res += QString("[") + v.vertex.toString() + "],";
StelUtils::rectToSphe(&ra, &dec, v.vertex); StelUtils::rectToSphe(&ra, &dec, v.vertex);
res += QString("[") + QString::number(ra*180./M_PI, 'g', 12) + "," + QString::number(dec*180./M_PI, 'g', 12) + "," + (v.edgeFlag ? QStr ing("true"): QString("false")) + "],"; res += QString("[") + QString::number(ra*180./M_PI, 'g', 12) + "," + QString::number(dec*180./M_PI, 'g', 12) + "," + (v.edgeFlag ? QStr ing("true"): QString("false")) + "],";
} }
res[res.size()-1]=']'; res[res.size()-1]=']';
return res; return res;
}; };
OctahedronPolygon::OctahedronPolygon(const QVector<Vec3d>& contour) : fillC achedVertexArray(StelVertexArray::Triangles), outlineCachedVertexArray(Stel VertexArray::Lines) OctahedronPolygon::OctahedronPolygon(const QVector<Vec3d>& contour) : fillC achedVertexArray(StelVertexArray::Triangles), outlineCachedVertexArray(Stel VertexArray::Lines)
{ {
sides.resize(8); sides.resize(8);
skipping to change at line 120 skipping to change at line 143
updateVertexArray(); updateVertexArray();
} }
void OctahedronPolygon::appendSubContour(const SubContour& inContour) void OctahedronPolygon::appendSubContour(const SubContour& inContour)
{ {
QVarLengthArray<QVector<SubContour>,8 > resultSides; QVarLengthArray<QVector<SubContour>,8 > resultSides;
resultSides.resize(8); resultSides.resize(8);
QVector<SubContour> splittedContour1[2]; QVector<SubContour> splittedContour1[2];
// Split the contour on the plan Y=0 // Split the contour on the plan Y=0
splitContourByPlan(1, inContour, splittedContour1); splitContourByPlan(1, inContour, splittedContour1);
// for (int c=0;c<2;++c)
// {
// for (int i=0;i<splittedContour1[c].size();++i)
// {
// SubContour& tmpSubContour = splittedContour1[c][i];
// // If the contour was not splitted, don't try to con
nect
// if (tmpSubContour.last().edgeFlag==true)
// continue;
// const Vec3d& v1(tmpSubContour.first().vertex);
// const Vec3d& v2(tmpSubContour.last().vertex);
// Q_ASSERT(fabs(v1[1])<1e-50);
// Q_ASSERT(fabs(v2[1])<1e-50);
// Vec3d v = tmpSubContour.first().vertex^tmpSubContour
.last().vertex;
// //qDebug() << v.toString();
// if (v1*v2<0.)
// {
// if (v1[0]<0)
// // A south pole has to be added
// tmpSubContour << EdgeVertex(Vec3d(0,0,-1), f
alse);
// }
// // else the contour ends on the same longitude line
as it starts
// else if (v[2]<-0.0000001)
// {
// // A north pole has to be added
// tmpSubContour << EdgeVertex(Vec3d(0,0,1), fa
lse);
// }
// else
// {
// // else the contour ends on the same longitu
de line as it starts
// Q_ASSERT(std::fabs(v[0])<0.0000001 || std::f
abs(v[1])<0.0000001);
// }
// tmpSubContour.closed=true;
// }
// }
// Re-split the contours on the plan X=0 // Re-split the contours on the plan X=0
QVector<SubContour> splittedVertices2[4]; QVector<SubContour> splittedVertices2[4];
foreach (const SubContour& subContour, splittedContour1[0]) foreach (const SubContour& subContour, splittedContour1[0])
splitContourByPlan(0, subContour, splittedVertices2); splitContourByPlan(0, subContour, splittedVertices2);
foreach (const SubContour& subContour, splittedContour1[1]) foreach (const SubContour& subContour, splittedContour1[1])
splitContourByPlan(0, subContour, splittedVertices2+2); splitContourByPlan(0, subContour, splittedVertices2+2);
// Now complete the contours which cross the areas from one side to another by adding poles // Now complete the contours which cross the areas from one side to another by adding poles
for (int c=0;c<4;++c) for (int c=0;c<4;++c)
{ {
for (int i=0;i<splittedVertices2[c].size();++i) for (int i=0;i<splittedVertices2[c].size();++i)
{ {
SubContour& tmpSubContour = splittedVertices2[c][i]; SubContour& tmpSubContour = splittedVertices2[c][i];
// If the contour was not splitted, don't try to con nect // If the contour was not splitted, don't try to con nect
if (tmpSubContour.last().edgeFlag==true) if (tmpSubContour.last().edgeFlag==true)
continue; continue;
Vec3d v = tmpSubContour.first().vertex^tmpSubContour .last().vertex; Vec3d v = tmpSubContour.first().vertex^tmpSubContour .last().vertex;
//qDebug() << v.toString();
if (v[2]>0.00000001) if (v[2]>0.00000001)
{ {
// A south pole has to be added // A south pole has to be added
tmpSubContour << EdgeVertex(Vec3d(0,0,-1), f alse); tmpSubContour << EdgeVertex(Vec3d(0,0,-1), f alse);
} }
else if (v[2]<-0.0000001) else if (v[2]<-0.0000001)
{ {
// A north pole has to be added // A north pole has to be added
tmpSubContour << EdgeVertex(Vec3d(0,0,1), fa lse); tmpSubContour << EdgeVertex(Vec3d(0,0,1), fa lse);
} }
skipping to change at line 295 skipping to change at line 356
QVector<Vec3d> OctahedronPolygon::tesselateOneSideTriangles(GLUEStesselator * tess, int sidenb) const QVector<Vec3d> OctahedronPolygon::tesselateOneSideTriangles(GLUEStesselator * tess, int sidenb) const
{ {
const QVector<SubContour>& contours = sides[sidenb]; const QVector<SubContour>& contours = sides[sidenb];
Q_ASSERT(!contours.isEmpty()); Q_ASSERT(!contours.isEmpty());
OctTessTrianglesCallbackData data; OctTessTrianglesCallbackData data;
gluesTessNormal(tess, 0.,0., (sidenb%2==0 ? -1. : 1.)); gluesTessNormal(tess, 0.,0., (sidenb%2==0 ? -1. : 1.));
gluesTessBeginPolygon(tess, &data); gluesTessBeginPolygon(tess, &data);
for (int c=0;c<contours.size();++c) for (int c=0;c<contours.size();++c)
{ {
//qDebug() << contours.at(c).toJSON();
gluesTessBeginContour(tess); gluesTessBeginContour(tess);
for (int i=0;i<contours.at(c).size();++i) for (int i=0;i<contours.at(c).size();++i)
{ {
//qDebug() << contours[c][i].vertex.toString();
gluesTessVertex(tess, const_cast<double*>((const dou ble*)contours[c][i].vertex.data()), (void*)&(contours[c][i].vertex)); gluesTessVertex(tess, const_cast<double*>((const dou ble*)contours[c][i].vertex.data()), (void*)&(contours[c][i].vertex));
} }
gluesTessEndContour(tess); gluesTessEndContour(tess);
} }
gluesTessEndPolygon(tess); gluesTessEndPolygon(tess);
Q_ASSERT(data.result.size()%3==0); // There should be only posi tive triangles here Q_ASSERT(data.result.size()%3==0); // There should be only posi tive triangles here
return data.result; return data.result;
} }
inline void unprojectOctahedron(Vec3d& v, const Vec3d& sideDirection) inline void unprojectOctahedron(Vec3d& v, const Vec3d& sideDirection)
skipping to change at line 433 skipping to change at line 492
QVector<SubContour> OctahedronPolygon::tesselateOneSideLineLoop(GLUEStessel ator* tess, int sidenb) const QVector<SubContour> OctahedronPolygon::tesselateOneSideLineLoop(GLUEStessel ator* tess, int sidenb) const
{ {
const QVector<SubContour>& contours = sides[sidenb]; const QVector<SubContour>& contours = sides[sidenb];
Q_ASSERT(!contours.isEmpty()); Q_ASSERT(!contours.isEmpty());
OctTessLineLoopCallbackData data; OctTessLineLoopCallbackData data;
gluesTessNormal(tess, 0.,0., (sidenb%2==0 ? -1. : 1.)); gluesTessNormal(tess, 0.,0., (sidenb%2==0 ? -1. : 1.));
gluesTessBeginPolygon(tess, &data); gluesTessBeginPolygon(tess, &data);
for (int c=0;c<contours.size();++c) for (int c=0;c<contours.size();++c)
{ {
//qDebug() << contours.at(c).toJSON();
gluesTessBeginContour(tess); gluesTessBeginContour(tess);
for (int i=0;i<contours.at(c).size();++i) for (int i=0;i<contours.at(c).size();++i)
{ {
//qDebug() << contours[c][i].vertex.toString();
Q_ASSERT(contours[c][i].vertex[2]<0.000001); Q_ASSERT(contours[c][i].vertex[2]<0.000001);
gluesTessVertex(tess, const_cast<double*>((const dou ble*)contours[c][i].vertex.data()), const_cast<void*>((const void*)&(contou rs[c][i]))); gluesTessVertex(tess, const_cast<double*>((const dou ble*)contours[c][i].vertex.data()), const_cast<void*>((const void*)&(contou rs[c][i])));
} }
gluesTessEndContour(tess); gluesTessEndContour(tess);
} }
gluesTessEndPolygon(tess); gluesTessEndPolygon(tess);
return data.resultList; return data.resultList;
} }
// Define the square of the angular distance from which we merge 2 points. // Define the square of the angular distance from which we merge 2 points.
skipping to change at line 465 skipping to change at line 522
Q_ASSERT(vertexData->vertex[2]<0.0000001); Q_ASSERT(vertexData->vertex[2]<0.0000001);
if (userData->result.isEmpty() || !tooClose(userData->result.last(). vertex, vertexData->vertex)) if (userData->result.isEmpty() || !tooClose(userData->result.last(). vertex, vertexData->vertex))
userData->result.append(*vertexData); userData->result.append(*vertexData);
else else
userData->result.last().edgeFlag = userData->result.last().e dgeFlag && vertexData->edgeFlag; userData->result.last().edgeFlag = userData->result.last().e dgeFlag && vertexData->edgeFlag;
} }
void combineLineLoopCallback(double coords[3], EdgeVertex* vertex_data[4], GLfloat[4], EdgeVertex** outData, OctTessLineLoopCallbackData* userData) void combineLineLoopCallback(double coords[3], EdgeVertex* vertex_data[4], GLfloat[4], EdgeVertex** outData, OctTessLineLoopCallbackData* userData)
{ {
bool newFlag=false; bool newFlag=false;
//qDebug() << "Combine data" << coords[0] << coords[1] << coords[2];
for (int i=0;i<4;++i) for (int i=0;i<4;++i)
{ {
if (vertex_data[i]==NULL) if (vertex_data[i]==NULL)
break; break;
//qDebug() << "Vertex " << i << dd->vertex.toString() << wei ght[i];
newFlag = newFlag || vertex_data[i]->edgeFlag; newFlag = newFlag || vertex_data[i]->edgeFlag;
} }
// Check that the new coordinate lay on the octahedron plane // Check that the new coordinate lay on the octahedron plane
// Q_ASSERT(fabs(fabs(coords[0])+fabs(coords[1])+fabs(coords[2])-1.)<0. 000001); // Q_ASSERT(fabs(fabs(coords[0])+fabs(coords[1])+fabs(coords[2])-1.)<0. 000001);
Q_ASSERT(coords[2]<0.000001); Q_ASSERT(coords[2]<0.000001);
userData->tempVertices.append(EdgeVertex(Vec3d(coords[0], coords[1], coords[2]),newFlag)); userData->tempVertices.append(EdgeVertex(Vec3d(coords[0], coords[1], coords[2]),newFlag));
*outData = &(userData->tempVertices.last()); *outData = &(userData->tempVertices.last());
} }
#ifndef NDEBUG #ifndef NDEBUG
skipping to change at line 604 skipping to change at line 659
} }
bool OctahedronPolygon::isEmpty() const bool OctahedronPolygon::isEmpty() const
{ {
return sides[0].isEmpty() && sides[1].isEmpty() && sides[2].isEmpty( ) && sides[3].isEmpty() && return sides[0].isEmpty() && sides[1].isEmpty() && sides[2].isEmpty( ) && sides[3].isEmpty() &&
sides[4].isEmpty() && sides[5].isEmpty() && sides[6] .isEmpty() && sides[7].isEmpty(); sides[4].isEmpty() && sides[5].isEmpty() && sides[6] .isEmpty() && sides[7].isEmpty();
} }
void OctahedronPolygon::splitContourByPlan(int onLine, const SubContour& in putContour, QVector<SubContour> result[2]) void OctahedronPolygon::splitContourByPlan(int onLine, const SubContour& in putContour, QVector<SubContour> result[2])
{ {
SubContour currentSubContour; SubContour currentSubContour;
SubContour unfinishedSubContour; SubContour unfinishedSubContour;
int previousQuadrant=getSide(inputContour.first().vertex, onLine); int previousQuadrant=getSide(inputContour.first().vertex, onLine);
int currentQuadrant=0; int currentQuadrant=0;
Vec3d tmpVertex; Vec3d tmpVertex;
EdgeVertex previousVertex=inputContour.first(); EdgeVertex previousVertex=inputContour.first();
EdgeVertex currentVertex; EdgeVertex currentVertex;
int i; int i=0;
bool ok=true; bool ok=true;
const Vec3d plan(onLine==0?1:0, onLine==1?1:0, onLine==2?1:0); const Vec3d plan(onLine==0?1:0, onLine==1?1:0, onLine==2?1:0);
// Take care first of the unfinished contour // Take care first of the unfinished contour
for (i=0;i<inputContour.size();++i) for (i=0;i<inputContour.size();++i)
{ {
currentVertex = inputContour.at(i); currentVertex = inputContour.at(i);
if (currentVertex.vertex[onLine]==0)
currentVertex.vertex[onLine]=1e-98;
currentQuadrant = getSide(currentVertex.vertex, onLine); currentQuadrant = getSide(currentVertex.vertex, onLine);
if (currentQuadrant==previousQuadrant) if (currentQuadrant==previousQuadrant)
{ {
unfinishedSubContour << currentVertex; unfinishedSubContour << currentVertex;
} }
else else
{ {
Q_ASSERT(currentSubContour.isEmpty()); Q_ASSERT(currentSubContour.isEmpty());
// We crossed the line // We crossed the line
tmpVertex = greatCircleIntersection(previousVertex.v ertex, currentVertex.vertex, plan, ok); tmpVertex = greatCircleIntersection(previousVertex.v ertex, currentVertex.vertex, plan, ok);
if (!ok) if (!ok)
{ {
// There was a problem, probably the 2 verti ces are too close, just keep them like that // There was a problem, probably the 2 verti ces are too close, just keep them like that
// since they are each at a different side o f the plan. // since they are each at a different side o f the plan.
currentSubContour << currentVertex; currentSubContour << currentVertex;
} }
else else
{ {
unfinishedSubContour << EdgeVertex(tmpVertex Vec3d tmpVertexSides[2];
, false); // Last point of the contour, it's not an edge tmpVertexSides[0]=tmpVertex;
currentSubContour << EdgeVertex(tmpVertex, f tmpVertexSides[1]=tmpVertex;
alse); tmpVertexSides[0][onLine]=1e-99;
tmpVertexSides[1][onLine]=-1e-99;
Q_ASSERT(getSide(tmpVertexSides[0], onLine)=
=0);
Q_ASSERT(getSide(tmpVertexSides[1], onLine)=
=1);
unfinishedSubContour << EdgeVertex(tmpVertex
Sides[previousQuadrant], false); // Last point of the contour, it's not an
edge
currentSubContour << EdgeVertex(tmpVertexSid
es[currentQuadrant], false);
} }
previousQuadrant = currentQuadrant; previousQuadrant = currentQuadrant;
previousVertex=currentVertex;
break; break;
} }
previousVertex=currentVertex; previousVertex=currentVertex;
} }
// Now handle the other ones // Now handle the other ones
for (;i<inputContour.size();++i) for (;i<inputContour.size();++i)
{ {
currentVertex = inputContour.at(i); currentVertex = inputContour.at(i);
if (currentVertex.vertex[onLine]==0)
currentVertex.vertex[onLine]=1e-98;
currentQuadrant = getSide(currentVertex.vertex, onLine); currentQuadrant = getSide(currentVertex.vertex, onLine);
if (currentQuadrant==previousQuadrant) if (currentQuadrant==previousQuadrant)
{ {
currentSubContour << currentVertex; currentSubContour << currentVertex;
} }
else else
{ {
// We crossed the line // We crossed the line
tmpVertex = greatCircleIntersection(previousVertex.v ertex, currentVertex.vertex, plan, ok); tmpVertex = greatCircleIntersection(previousVertex.v ertex, currentVertex.vertex, plan, ok);
if (!ok) if (!ok)
skipping to change at line 669 skipping to change at line 739
// There was a problem, probably the 2 verti ces are too close, just keep them like that // There was a problem, probably the 2 verti ces are too close, just keep them like that
// since they are each at a different side o f the plan. // since they are each at a different side o f the plan.
currentSubContour.last().edgeFlag = true; currentSubContour.last().edgeFlag = true;
result[previousQuadrant] << currentSubContou r; result[previousQuadrant] << currentSubContou r;
currentSubContour.clear(); currentSubContour.clear();
currentSubContour << currentVertex; currentSubContour << currentVertex;
currentSubContour.last().edgeFlag = true; currentSubContour.last().edgeFlag = true;
} }
else else
{ {
currentSubContour << EdgeVertex(tmpVertex, f Vec3d tmpVertexSides[2];
alse); // Last point of the contour, it's not an edge tmpVertexSides[0]=tmpVertex;
tmpVertexSides[1]=tmpVertex;
tmpVertexSides[0][onLine]=1e-99;
tmpVertexSides[1][onLine]=-1e-99;
Q_ASSERT(getSide(tmpVertexSides[0], onLine)=
=0);
Q_ASSERT(getSide(tmpVertexSides[1], onLine)=
=1);
currentSubContour << EdgeVertex(tmpVertexSid
es[previousQuadrant], false);
result[previousQuadrant] << currentSubContou r; result[previousQuadrant] << currentSubContou r;
currentSubContour.clear(); currentSubContour.clear();
currentSubContour << EdgeVertex(tmpVertex, f alse); currentSubContour << EdgeVertex(tmpVertexSid es[currentQuadrant], false);
currentSubContour << currentVertex; currentSubContour << currentVertex;
} }
previousQuadrant = currentQuadrant; previousQuadrant = currentQuadrant;
} }
previousVertex=currentVertex; previousVertex=currentVertex;
} }
// Handle the last line between the last and first point // Handle the last line between the last and first point
previousQuadrant = currentQuadrant; previousQuadrant = currentQuadrant;
currentQuadrant = getSide(inputContour.first().vertex, onLine); currentQuadrant = getSide(inputContour.first().vertex, onLine);
skipping to change at line 700 skipping to change at line 778
if (!ok) if (!ok)
{ {
// There was a problem, probably the 2 vertices are too close, just keep them like that // There was a problem, probably the 2 vertices are too close, just keep them like that
// since they are each at a different side of the pl an. // since they are each at a different side of the pl an.
currentSubContour.last().edgeFlag = true; currentSubContour.last().edgeFlag = true;
result[previousQuadrant] << currentSubContour; result[previousQuadrant] << currentSubContour;
currentSubContour.clear(); currentSubContour.clear();
} }
else else
{ {
currentSubContour << EdgeVertex(tmpVertex, false); Vec3d tmpVertexSides[2];
// Last point of the contour, it's not an edge tmpVertexSides[0]=tmpVertex;
tmpVertexSides[1]=tmpVertex;
tmpVertexSides[0][onLine]=1e-99;
tmpVertexSides[1][onLine]=-1e-99;
Q_ASSERT(getSide(tmpVertexSides[0], onLine)==0);
Q_ASSERT(getSide(tmpVertexSides[1], onLine)==1);
currentSubContour << EdgeVertex(tmpVertexSides[previ
ousQuadrant], false); // Last point of the contour, it's not an edge
result[previousQuadrant] << currentSubContour; result[previousQuadrant] << currentSubContour;
currentSubContour.clear(); currentSubContour.clear();
currentSubContour << EdgeVertex(tmpVertex, false); currentSubContour << EdgeVertex(tmpVertexSides[curre ntQuadrant], false);
} }
} }
// Append the last contour made from the last vertices + the previou s unfinished ones // Append the last contour made from the last vertices + the previou s unfinished ones
currentSubContour << unfinishedSubContour; currentSubContour << unfinishedSubContour;
result[currentQuadrant] << currentSubContour;
}
SubContour::SubContour(const QVector<Vec3d>& vertices, bool closed) : QVect result[currentQuadrant] << currentSubContour;
or<EdgeVertex>(vertices.size(), EdgeVertex(true))
{
// Create the contour list by adding the matching edge flags
for (int i=0;i<vertices.size();++i)
(*this)[i].vertex = vertices.at(i);
if (closed==false)
{
this->first().edgeFlag=false;
this->last().edgeFlag=false;
}
}
SubContour SubContour::reversed() const // qDebug() << onLine << inputContour.toJSON();
{ // if (!result[0].isEmpty())
SubContour res; // qDebug() << result[0].at(0).toJSON();
QVectorIterator<EdgeVertex> iter(*this); // if (!result[1].isEmpty())
iter.toBack(); // qDebug() << result[1].at(0).toJSON();
while (iter.hasPrevious())
res.append(iter.previous());
return res;
} }
void OctahedronPolygon::computeBoundingCap() void OctahedronPolygon::computeBoundingCap()
{ {
const QVector<Vec3d>& trianglesArray = outlineCachedVertexArray.vert ex; const QVector<Vec3d>& trianglesArray = outlineCachedVertexArray.vert ex;
if (trianglesArray.isEmpty()) if (trianglesArray.isEmpty())
{ {
capN.set(1,0,0); capN.set(1,0,0);
capD = 2.; capD = 2.;
return; return;
skipping to change at line 791 skipping to change at line 862
sc.clear(); sc.clear();
side.clear(); side.clear();
sc << EdgeVertex(vertice[verticeIndice[i][0]], false) sc << EdgeVertex(vertice[verticeIndice[i][0]], false)
<< EdgeVertex(vertice[verticeIndice[i][1]], false) << EdgeVertex(vertice[verticeIndice[i][1]], false)
<< EdgeVertex(vertice[verticeIndice[i][2]], false); << EdgeVertex(vertice[verticeIndice[i][2]], false);
side.append(sc); side.append(sc);
poly.sides[i]=side; poly.sides[i]=side;
} }
projectOnOctahedron(poly.sides); projectOnOctahedron(poly.sides);
poly.updateVertexArray(); poly.updateVertexArray();
poly.capD = -2;
Q_ASSERT(std::fabs(poly.getArea()-4.*M_PI)<0.0000001); Q_ASSERT(std::fabs(poly.getArea()-4.*M_PI)<0.0000001);
return poly; return poly;
} }
const OctahedronPolygon& OctahedronPolygon::getAllSkyOctahedronPolygon() const OctahedronPolygon& OctahedronPolygon::getAllSkyOctahedronPolygon()
{ {
static const OctahedronPolygon poly = createAllSkyOctahedronPolygon( ); static const OctahedronPolygon poly = createAllSkyOctahedronPolygon( );
return poly; return poly;
} }
skipping to change at line 821 skipping to change at line 893
return out; return out;
} }
QDataStream& operator>>(QDataStream& in, OctahedronPolygon& p) QDataStream& operator>>(QDataStream& in, OctahedronPolygon& p)
{ {
for (int i=0;i<8;++i) for (int i=0;i<8;++i)
{ {
in >> p.sides[i]; in >> p.sides[i];
} }
// p.updateVertexArray();
in >> p.fillCachedVertexArray; in >> p.fillCachedVertexArray;
in >> p.outlineCachedVertexArray; in >> p.outlineCachedVertexArray;
in >> p.capN; in >> p.capN;
in >> p.capD; in >> p.capD;
return in; return in;
} }
 End of changes. 27 change blocks. 
40 lines changed or deleted 125 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/