TrailGroup.cpp   TrailGroup.cpp 
skipping to change at line 45 skipping to change at line 45
void TrailGroup::draw(StelCore* core, StelPainter* sPainter) void TrailGroup::draw(StelCore* core, StelPainter* sPainter)
{ {
sPainter->setBlending(true); sPainter->setBlending(true);
float currentTime = core->getJDE(); float currentTime = core->getJDE();
StelProjector::ModelViewTranformP transfo = core->getJ2000ModelViewT ransform(); StelProjector::ModelViewTranformP transfo = core->getJ2000ModelViewT ransform();
transfo->combine(j2000ToTrailNativeInverted); transfo->combine(j2000ToTrailNativeInverted);
sPainter->setProjector(core->getProjection(transfo)); sPainter->setProjector(core->getProjection(transfo));
foreach (const Trail& trail, allTrails) foreach (const Trail& trail, allTrails)
{ {
Planet* hpl = dynamic_cast<Planet*>(trail.stelObject.data()) ; Planet* hpl = dynamic_cast<Planet*>(trail.stelObject.data()) ;
if (hpl!=NULL) if (hpl!=Q_NULLPTR)
{ {
// Avoid drawing the trails if the object is the hom e planet // Avoid drawing the trails if the object is the hom e planet
QString homePlanetName = hpl->getEnglishName(); QString homePlanetName = hpl->getEnglishName();
if (homePlanetName==StelApp::getInstance().getCore() ->getCurrentLocation().planetName) if (homePlanetName==StelApp::getInstance().getCore() ->getCurrentLocation().planetName)
continue; continue;
} }
const QList<Vec3d>& posHistory = trail.posHistory; const QList<Vec3d>& posHistory = trail.posHistory;
vertexArray.resize(posHistory.size()); vertexArray.resize(posHistory.size());
colorArray.resize(posHistory.size()); colorArray.resize(posHistory.size());
for (int i=0;i<posHistory.size();++i) for (int i=0;i<posHistory.size();++i)
skipping to change at line 92 skipping to change at line 92
// Set the matrix to use to post process J2000 positions before storing in the trail // Set the matrix to use to post process J2000 positions before storing in the trail
void TrailGroup::setJ2000ToTrailNative(const Mat4d& m) void TrailGroup::setJ2000ToTrailNative(const Mat4d& m)
{ {
j2000ToTrailNative=m; j2000ToTrailNative=m;
j2000ToTrailNativeInverted=m.inverse(); j2000ToTrailNativeInverted=m.inverse();
} }
void TrailGroup::addObject(const StelObjectP& obj, const Vec3f* col) void TrailGroup::addObject(const StelObjectP& obj, const Vec3f* col)
{ {
allTrails.append(TrailGroup::Trail(obj, col==NULL ? obj->getInfoColo r() : *col)); allTrails.append(TrailGroup::Trail(obj, col==Q_NULLPTR ? obj->getInf oColor() : *col));
} }
void TrailGroup::reset() void TrailGroup::reset()
{ {
times.clear(); times.clear();
for (QList<Trail>::Iterator iter=allTrails.begin();iter!=allTrails.e nd();++iter) for (QList<Trail>::Iterator iter=allTrails.begin();iter!=allTrails.e nd();++iter)
{ {
iter->posHistory.clear(); iter->posHistory.clear();
} }
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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/