StelSkyImageTile.cpp   StelSkyImageTile.cpp 
skipping to change at line 47 skipping to change at line 47
initCtor(); initCtor();
} }
void StelSkyImageTile::initCtor() void StelSkyImageTile::initCtor()
{ {
minResolution = -1; minResolution = -1;
luminance = -1; luminance = -1;
alphaBlend = false; alphaBlend = false;
noTexture = false; noTexture = false;
texFader = NULL; texFader = NULL;
birthJD = -1e10;
} }
// Constructor // Constructor
StelSkyImageTile::StelSkyImageTile(const QString& url, StelSkyImageTile* pa rent) : MultiLevelJsonBase(parent) StelSkyImageTile::StelSkyImageTile(const QString& url, StelSkyImageTile* pa rent) : MultiLevelJsonBase(parent)
{ {
initCtor(); initCtor();
if (parent!=NULL) if (parent!=NULL)
{ {
luminance = parent->luminance; luminance = parent->luminance;
alphaBlend = parent->alphaBlend; alphaBlend = parent->alphaBlend;
skipping to change at line 143 skipping to change at line 144
return; return;
} }
if (luminance>0 && luminance<limitLuminance) if (luminance>0 && luminance<limitLuminance)
{ {
// Schedule a deletion // Schedule a deletion
scheduleChildsDeletion(); scheduleChildsDeletion();
return; return;
} }
if (birthJD>-1e10 && birthJD>core->getJD())
{
// Schedule a deletion
scheduleChildsDeletion();
return;
}
// Check that we are in the screen // Check that we are in the screen
bool fullInScreen = true; bool fullInScreen = true;
bool intersectScreen = false; bool intersectScreen = false;
if (recheckIntersect) if (recheckIntersect)
{ {
if (skyConvexPolygons.isEmpty()) if (skyConvexPolygons.isEmpty())
{ {
// If no polygon is defined, we assume that the tile covers the whole sky // If no polygon is defined, we assume that the tile covers the whole sky
fullInScreen=false; fullInScreen=false;
intersectScreen=true; intersectScreen=true;
skipping to change at line 457 skipping to change at line 465
if (absoluteImageURI.isEmpty()) if (absoluteImageURI.isEmpty())
{ {
// Maybe the user meant a file in stellarium local files // Maybe the user meant a file in stellarium local files
absoluteImageURI = imageUrl; absoluteImageURI = imageUrl;
} }
} }
} }
else else
noTexture = true; noTexture = true;
if (map.contains("birthJD"))
birthJD = map.value("birthJD").toDouble();
else
birthJD = -1e10;
// 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 StelSkyImageTile objects will be created later) // (in this later case, the StelSkyImageTile objects will be created later)
subTilesUrls = map.value("subTiles").toList(); subTilesUrls = map.value("subTiles").toList();
for (QVariantList::Iterator i=subTilesUrls.begin(); i!=subTilesUrls. end();++i) for (QVariantList::Iterator i=subTilesUrls.begin(); i!=subTilesUrls. end();++i)
{ {
if (i->type()==QVariant::Map) if (i->type()==QVariant::Map)
{ {
// Check if the JSON object is a reference, i.e. if it contains a $ref key // Check if the JSON object is a reference, i.e. if it contains a $ref key
QVariantMap m = i->toMap(); QVariantMap m = i->toMap();
if (m.size()==1 && m.contains("$ref")) if (m.size()==1 && m.contains("$ref"))
skipping to change at line 509 skipping to change at line 522
imCredits["full"]=serverCredits.fullCredits; imCredits["full"]=serverCredits.fullCredits;
if (!serverCredits.infoURL.isEmpty()) if (!serverCredits.infoURL.isEmpty())
imCredits["infoUrl"]=serverCredits.infoURL; imCredits["infoUrl"]=serverCredits.infoURL;
if (!serCredits.empty()) if (!serCredits.empty())
res["serverCredits"]=serCredits; res["serverCredits"]=serCredits;
// Misc // Misc
if (!shortName.isEmpty()) if (!shortName.isEmpty())
res["shortName"] = shortName; res["shortName"] = shortName;
if (minResolution>0) if (minResolution>0)
res["minResolution"]=minResolution; res["minResolution"]=minResolution;
if (luminance>0) if (luminance>0)
res["maxBrightness"]=StelApp::getInstance().getCore()->getSk yDrawer()->luminanceToSurfacebrightness(luminance); res["maxBrightness"]=StelApp::getInstance().getCore()->getSk yDrawer()->luminanceToSurfacebrightness(luminance);
if (alphaBlend) if (alphaBlend)
res["alphaBlend"]=true; res["alphaBlend"]=true;
if (noTexture==false) if (noTexture==false)
res["imageUrl"]=absoluteImageURI; res["imageUrl"]=absoluteImageURI;
if (birthJD>-1e10)
res["birthJD"]=birthJD;
// Polygons // Polygons
// TODO // TODO
// textures positions // textures positions
// TODO // TODO
if (!subTilesUrls.empty()) if (!subTilesUrls.empty())
{ {
res["subTiles"] = subTilesUrls; res["subTiles"] = subTilesUrls;
 End of changes. 5 change blocks. 
1 lines changed or deleted 16 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/