StelSkyPolygon.cpp   StelSkyPolygon.cpp 
skipping to change at line 55 skipping to change at line 55
{ {
initCtor(); initCtor();
initFromQVariantMap(map); initFromQVariantMap(map);
} }
// Destructor // Destructor
StelSkyPolygon::~StelSkyPolygon() StelSkyPolygon::~StelSkyPolygon()
{ {
} }
void StelSkyPolygon::draw(StelCore* core, StelPainter& sPainter, float opac ity) void StelSkyPolygon::draw(StelCore* core, StelPainter& sPainter, float)
{ {
const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ; const StelProjectorP prj = core->getProjection(StelCore::FrameJ2000) ;
QMultiMap<double, StelSkyPolygon*> result; QMultiMap<double, StelSkyPolygon*> result;
getTilesToDraw(result, core, prj->getViewportConvexPolygon(0, 0), tr ue); getTilesToDraw(result, core, prj->getViewportConvexPolygon(0, 0), tr ue);
// Draw in the good order // Draw in the good order
sPainter.enableTexture2d(false); sPainter.enableTexture2d(false);
glBlendFunc(GL_ONE, GL_ONE); glBlendFunc(GL_ONE, GL_ONE);
QMap<double, StelSkyPolygon*>::Iterator i = result.end(); QMap<double, StelSkyPolygon*>::Iterator i = result.end();
skipping to change at line 198 skipping to change at line 198
if (map.contains("serverCredits")) if (map.contains("serverCredits"))
{ {
QVariantMap sCredits = map.value("serverCredits").toMap(); QVariantMap sCredits = map.value("serverCredits").toMap();
serverCredits.shortCredits = sCredits.value("short").toStrin g(); serverCredits.shortCredits = sCredits.value("short").toStrin g();
serverCredits.fullCredits = sCredits.value("full").toString( ); serverCredits.fullCredits = sCredits.value("full").toString( );
serverCredits.infoURL = sCredits.value("infoUrl").toString() ; serverCredits.infoURL = sCredits.value("infoUrl").toString() ;
} }
shortName = map.value("shortName").toString(); shortName = map.value("shortName").toString();
bool ok=false; bool ok=false;
minResolution = map.value("minResolution").toDouble(&ok); minResolution = map.value("minResolution").toFloat(&ok);
if (!ok) if (!ok)
throw std::runtime_error(qPrintable(QString("minResolution e xpect a double value, found: %1").arg(map.value("minResolution").toString() ))); throw std::runtime_error(qPrintable(QString("minResolution e xpect a double value, found: %1").arg(map.value("minResolution").toString() )));
// Load the convex polygons (if any) // Load the convex polygons (if any)
QVariantList polyList = map.value("worldCoords").toList(); QVariantList polyList = map.value("worldCoords").toList();
foreach (const QVariant& polyRaDec, polyList) foreach (const QVariant& polyRaDec, polyList)
{ {
QList<Vec3d> vertices; QList<Vec3d> vertices;
foreach (QVariant vRaDec, polyRaDec.toList()) foreach (QVariant vRaDec, polyRaDec.toList())
{ {
const QVariantList vl = vRaDec.toList(); const QVariantList vl = vRaDec.toList();
Vec3d v; Vec3d v;
StelUtils::spheToRect(vl.at(0).toDouble(&ok)*M_PI/18 0., vl.at(1).toDouble(&ok)*M_PI/180., v); StelUtils::spheToRect(vl.at(0).toFloat(&ok)*M_PI/180 .f, vl.at(1).toFloat(&ok)*M_PI/180.f, v);
if (!ok) if (!ok)
throw std::runtime_error("wrong Ra and Dec, expect a double value"); throw std::runtime_error("wrong Ra and Dec, expect a double value");
vertices.append(v); vertices.append(v);
} }
Q_ASSERT(vertices.size()==4); Q_ASSERT(vertices.size()==4);
skyConvexPolygons.append(SphericalConvexPolygon(vertices[0], vertices[1], vertices[2], vertices[3])); skyConvexPolygons.append(SphericalConvexPolygon(vertices[0], vertices[1], vertices[2], vertices[3]));
} }
// This is a list of URLs to the child tiles or a list of already lo aded map containing child information // This is a list of URLs to the child tiles or a list of already lo aded map containing child information
// (in this later case, the StelSkyPolygon objects will be created l ater) // (in this later case, the StelSkyPolygon objects will be created l ater)
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 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/