GridLinesMgr.cpp   GridLinesMgr.cpp 
skipping to change at line 23 skipping to change at line 23
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include <set> #include <set>
#include <QSettings> #include <QSettings>
#include <QDebug> #include <QDebug>
#include <QFontMetrics>
#include <QtOpenGL>
#include "GridLinesMgr.hpp" #include "GridLinesMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelNavigator.hpp" #include "StelNavigator.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelLoadingBar.hpp" #include "StelLoadingBar.hpp"
#include "StelFader.hpp" #include "StelFader.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "StelFontMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelFont.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#include "StelPainter.hpp" #include "StelPainter.hpp"
//! @class SkyGrid //! @class SkyGrid
//! Class which manages a grid to display in the sky. //! Class which manages a grid to display in the sky.
//! TODO needs support for DMS/DMS labelling, not only HMS/DMS //! TODO needs support for DMS/DMS labelling, not only HMS/DMS
class SkyGrid class SkyGrid
{ {
public: public:
// Create and precompute positions of a SkyGrid // Create and precompute positions of a SkyGrid
SkyGrid(StelCore::FrameType frame); SkyGrid(StelCore::FrameType frame);
virtual ~SkyGrid(); virtual ~SkyGrid();
void draw(const StelCore* prj) const; void draw(const StelCore* prj) const;
void setFontSize(double newFontSize); void setFontSize(double newFontSize);
void setColor(const Vec3f& c) {color = c;} void setColor(const Vec3f& c) {color = c;}
const Vec3f& getColor() {return color;} const Vec3f& getColor() {return color;}
void update(double deltaTime) {fader.update((int)(deltaTime*1000));} void update(double deltaTime) {fader.update((int)(deltaTime*1000));}
void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));} void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));}
void setFlagshow(bool b){fader = b;} void setFlagshow(bool b){fader = b;}
bool getFlagshow(void) const {return fader;} bool getFlagshow(void) const {return fader;}
private: private:
Vec3f color; Vec3f color;
StelCore::FrameType frameType; StelCore::FrameType frameType;
double fontSize; QFont font;
StelFont& font;
LinearFader fader; LinearFader fader;
}; };
//! @class SkyLine //! @class SkyLine
//! Class which manages a line to display around the sky like the ecliptic line. //! Class which manages a line to display around the sky like the ecliptic line.
class SkyLine class SkyLine
{ {
public: public:
enum SKY_LINE_TYPE enum SKY_LINE_TYPE
{ {
EQUATOR, EQUATOR,
ECLIPTIC, ECLIPTIC,
MERIDIAN MERIDIAN
}; };
// Create and precompute positions of a SkyGrid // Create and precompute positions of a SkyGrid
SkyLine(SKY_LINE_TYPE _line_type = EQUATOR); SkyLine(SKY_LINE_TYPE _line_type = EQUATOR);
virtual ~SkyLine(); virtual ~SkyLine();
void draw(StelCore* core) const; void draw(StelCore* core) const;
void setColor(const Vec3f& c) {color = c;} void setColor(const Vec3f& c) {color = c;}
const Vec3f& getColor() {return color;} const Vec3f& getColor() {return color;}
void update(double deltaTime) {fader.update((int)(deltaTime*1000));} void update(double deltaTime) {fader.update((int)(deltaTime*1000));}
void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));} void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));}
void setFlagshow(bool b){fader = b;} void setFlagshow(bool b){fader = b;}
bool getFlagshow(void) const {return fader;} bool getFlagshow(void) const {return fader;}
void setFontSize(double newSize); void setFontSize(double newSize);
private: private:
SKY_LINE_TYPE line_type; SKY_LINE_TYPE line_type;
Vec3f color; Vec3f color;
StelCore::FrameType frameType; StelCore::FrameType frameType;
LinearFader fader; LinearFader fader;
double fontSize; QFont font;
StelFont& font;
QString label; QString label;
}; };
// rms added color as parameter // rms added color as parameter
SkyGrid::SkyGrid(StelCore::FrameType frame) : color(0.2,0.2,0.2), frameType SkyGrid::SkyGrid(StelCore::FrameType frame) : color(0.2,0.2,0.2), frameType
(frame), fontSize(12), (frame)
font(StelApp::getInstance().getFontManager().getStandardFont(StelApp
::getInstance().getLocaleMgr().getAppLanguage(), fontSize))
{ {
font.setPixelSize(12);
} }
SkyGrid::~SkyGrid() SkyGrid::~SkyGrid()
{ {
} }
void SkyGrid::setFontSize(double newFontSize) void SkyGrid::setFontSize(double newFontSize)
{ {
fontSize = newFontSize; font.setPixelSize(newFontSize);
font = StelApp::getInstance().getFontManager().getStandardFont(StelA
pp::getInstance().getLocaleMgr().getAppLanguage(), fontSize);
} }
// Conversion into mas = milli arcsecond // Conversion into mas = milli arcsecond
static const double RADIAN_MAS = 180./M_PI*1000.*60.*60.; static const double RADIAN_MAS = 180./M_PI*1000.*60.*60.;
static const double DEGREE_MAS = 1000.*60.*60.; static const double DEGREE_MAS = 1000.*60.*60.;
// Step sizes in arcsec // Step sizes in arcsec
static const double STEP_SIZES_DMS[] = {0.05, 0.2, 1., 5., 10., 60., 300., 600., 1200., 3600., 3600.*5., 3600.*10.}; static const double STEP_SIZES_DMS[] = {0.05, 0.2, 1., 5., 10., 60., 300., 600., 1200., 3600., 3600.*5., 3600.*10.};
static const double STEP_SIZES_HMS[] = {0.05, 0.2, 1.5, 7.5, 15., 15.*5., 1 5.*10., 15.*60., 15.*60.*5., 15.*60*10., 15.*60*60}; static const double STEP_SIZES_HMS[] = {0.05, 0.2, 1.5, 7.5, 15., 15.*5., 1 5.*10., 15.*60., 15.*60.*5., 15.*60*10., 15.*60*60};
skipping to change at line 150 skipping to change at line 147
for (unsigned int i=0;i<11;++i) for (unsigned int i=0;i<11;++i)
if (STEP_SIZES_HMS[i]>minSizeArcsec) if (STEP_SIZES_HMS[i]>minSizeArcsec)
{ {
return STEP_SIZES_HMS[i]/3600.; return STEP_SIZES_HMS[i]/3600.;
} }
return 15.; return 15.;
} }
struct ViewportEdgeIntersectCallbackData struct ViewportEdgeIntersectCallbackData
{ {
ViewportEdgeIntersectCallbackData(const StelPainter& p) : sPainter(p ViewportEdgeIntersectCallbackData(StelPainter* p) : sPainter(p) {;}
) {;} StelPainter* sPainter;
const StelPainter& sPainter;
StelFont* font;
Vec4f textColor; Vec4f textColor;
QString text; // Label to display at the intersection of t he lines and screen side QString text; // Label to display at the intersection of t he lines and screen side
double raAngle; // Used for meridians double raAngle; // Used for meridians
StelCore::FrameType frameType; StelCore::FrameType frameType;
}; };
// Callback which draws the label of the grid // Callback which draws the label of the grid
void viewportEdgeIntersectCallback(const Vec3d& screenPos, const Vec3d& dir ection, const void* userData) void viewportEdgeIntersectCallback(const Vec3d& screenPos, const Vec3d& dir ection, void* userData)
{ {
const ViewportEdgeIntersectCallbackData* d = static_cast<const Viewp ortEdgeIntersectCallbackData*>(userData); ViewportEdgeIntersectCallbackData* d = static_cast<ViewportEdgeInter sectCallbackData*>(userData);
Vec3d direc(direction); Vec3d direc(direction);
direc.normalize(); direc.normalize();
GLfloat tmpColor[4]; const Vec4f& tmpColor = d->sPainter->getColor();
glGetFloatv(GL_CURRENT_COLOR, tmpColor); d->sPainter->setColor(d->textColor[0], d->textColor[1], d->textColor
glColor4fv(d->textColor); [2], d->textColor[3]);
QString text; QString text;
if (d->text.isEmpty()) if (d->text.isEmpty())
{ {
// We are in the case of meridians, we need to determine whi ch of the 2 labels (3h or 15h to use) // We are in the case of meridians, we need to determine whi ch of the 2 labels (3h or 15h to use)
Vec3d tmpV; Vec3d tmpV;
d->sPainter.getProjector()->unProject(screenPos, tmpV); d->sPainter->getProjector()->unProject(screenPos, tmpV);
double lon, lat; double lon, lat;
StelUtils::rectToSphe(&lon, &lat, tmpV); StelUtils::rectToSphe(&lon, &lat, tmpV);
if (d->frameType==StelCore::FrameAltAz) if (d->frameType==StelCore::FrameAltAz)
{ {
double raAngle = M_PI-d->raAngle; double raAngle = M_PI-d->raAngle;
lon = M_PI-lon; lon = M_PI-lon;
if (raAngle<0) if (raAngle<0)
raAngle=+2.*M_PI; raAngle=+2.*M_PI;
if (lon<0) if (lon<0)
lon=+2.*M_PI; lon=+2.*M_PI;
skipping to change at line 223 skipping to change at line 218
} }
} }
else else
text = d->text; text = d->text;
double angleDeg = std::atan2(-direc[1], -direc[0])*180./M_PI; double angleDeg = std::atan2(-direc[1], -direc[0])*180./M_PI;
float xshift=6.f; float xshift=6.f;
if (angleDeg>90. || angleDeg<-90.) if (angleDeg>90. || angleDeg<-90.)
{ {
angleDeg+=180.; angleDeg+=180.;
xshift=-d->font->getStrLen(text)-6.f; xshift=-d->sPainter->getFontMetrics().width(text)-6.f;
} }
d->sPainter.drawText(d->font, screenPos[0], screenPos[1], text, angl d->sPainter->drawText(screenPos[0], screenPos[1], text, angleDeg, xs
eDeg, xshift, 3); hift, 3);
glColor4fv(tmpColor); d->sPainter->setColor(tmpColor[0], tmpColor[1], tmpColor[2], tmpColo
r[3]);
} }
//! Draw the sky grid in the current frame //! Draw the sky grid in the current frame
void SkyGrid::draw(const StelCore* core) const void SkyGrid::draw(const StelCore* core) const
{ {
const StelProjectorP prj = core->getProjection(frameType); const StelProjectorP prj = core->getProjection(frameType);
if (!fader.getInterstate()) if (!fader.getInterstate())
return; return;
// Look for all meridians and parallels intersecting with the disk b ounding the viewport // Look for all meridians and parallels intersecting with the disk b ounding the viewport
skipping to change at line 255 skipping to change at line 250
southPoleInViewport = true; southPoleInViewport = true;
// Get the longitude and latitude resolution at the center of the vi ewport // Get the longitude and latitude resolution at the center of the vi ewport
Vec3d centerV; Vec3d centerV;
prj->unProject(prj->getViewportPosX()+prj->getViewportWidth()/2, prj ->getViewportPosY()+prj->getViewportHeight()/2+1, centerV); prj->unProject(prj->getViewportPosX()+prj->getViewportWidth()/2, prj ->getViewportPosY()+prj->getViewportHeight()/2+1, centerV);
double lon2, lat2; double lon2, lat2;
StelUtils::rectToSphe(&lon2, &lat2, centerV); StelUtils::rectToSphe(&lon2, &lat2, centerV);
const double gridStepParallelRad = M_PI/180.*getClosestResolutionDMS (prj->getPixelPerRadAtCenter()); const double gridStepParallelRad = M_PI/180.*getClosestResolutionDMS (prj->getPixelPerRadAtCenter());
double gridStepMeridianRad; double gridStepMeridianRad;
if (northPoleInViewport || southPoleInViewport) if (northPoleInViewport || southPoleInViewport)
gridStepMeridianRad = M_PI/180.* 15.; gridStepMeridianRad = (frameType==StelCore::FrameAltAz) ? M_ PI/180.* 10. : M_PI/180.* 15.;
else else
{ {
const double closetResLon = (frameType==StelCore::FrameAltAz ) ? getClosestResolutionDMS(prj->getPixelPerRadAtCenter()*std::cos(lat2)) : getClosestResolutionHMS(prj->getPixelPerRadAtCenter()*std::cos(lat2)); const double closetResLon = (frameType==StelCore::FrameAltAz ) ? getClosestResolutionDMS(prj->getPixelPerRadAtCenter()*std::cos(lat2)) : getClosestResolutionHMS(prj->getPixelPerRadAtCenter()*std::cos(lat2));
gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so uthPoleInViewport) ? 15. : closetResLon); gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so uthPoleInViewport) ? 15. : closetResLon);
} }
// Get the bounding halfspace // Get the bounding halfspace
const StelGeom::HalfSpace viewPortHalfSpace = prj->getBoundingHalfSp ace(); const SphericalCap viewPortSphericalCap = prj->getBoundingSphericalC ap();
// Compute the first grid starting point. This point is close to the center of the screen // Compute the first grid starting point. This point is close to the center of the screen
// and lays at the intersection of a meridien and a parallel // and lays at the intersection of a meridien and a parallel
lon2 = gridStepMeridianRad*((int)(lon2/gridStepMeridianRad)); lon2 = gridStepMeridianRad*((int)(lon2/gridStepMeridianRad+0.5));
lat2 = gridStepParallelRad*((int)(lat2/gridStepParallelRad)); lat2 = gridStepParallelRad*((int)(lat2/gridStepParallelRad+0.5));
Vec3d firstPoint; Vec3d firstPoint;
StelUtils::spheToRect(lon2, lat2, firstPoint); StelUtils::spheToRect(lon2, lat2, firstPoint);
firstPoint.normalize(); firstPoint.normalize();
Q_ASSERT(viewPortHalfSpace.contains(firstPoint)); // Q_ASSERT(viewPortSphericalCap.contains(firstPoint));
// Initialize a painter and set openGL state // Initialize a painter and set openGL state
StelPainter sPainter(prj); StelPainter sPainter(prj);
glEnable(GL_LINE_SMOOTH);
glDisable(GL_TEXTURE_2D);
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transpa rency mode glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transpa rency mode
Vec4f textColor(color[0], color[1], color[2], 0); Vec4f textColor(color[0], color[1], color[2], 0);
if (StelApp::getInstance().getVisionModeNight()) if (StelApp::getInstance().getVisionModeNight())
{ {
// instead of a filter which just zeros G&B, set the red // instead of a filter which just zeros G&B, set the red
// value to the mean brightness of RGB. // value to the mean brightness of RGB.
float red = (color[0] + color[1] + color[2]) / 3.0; float red = (color[0] + color[1] + color[2]) / 3.0;
textColor[0] = red; textColor[0] = red;
textColor[1] = 0.; textColor[2] = 0.; textColor[1] = 0.; textColor[2] = 0.;
glColor4f(red, 0, 0, fader.getInterstate()); sPainter.setColor(red, 0, 0, fader.getInterstate());
} }
else else
{ {
glColor4f(color[0],color[1],color[2], fader.getInterstate()) ; sPainter.setColor(color[0],color[1],color[2], fader.getInter state());
} }
textColor*=2; textColor*=2;
textColor[3]=fader.getInterstate(); textColor[3]=fader.getInterstate();
ViewportEdgeIntersectCallbackData userData(sPainter); sPainter.setFont(font);
userData.font = &font; ViewportEdgeIntersectCallbackData userData(&sPainter);
userData.textColor = textColor; userData.textColor = textColor;
userData.frameType = frameType; userData.frameType = frameType;
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Draw all the meridians (great circles) // Draw all the meridians (great circles)
StelGeom::HalfSpace meridianHalfSpace(Vec3d(1,0,0), 0); SphericalCap meridianSphericalCap(Vec3d(1,0,0), 0);
Mat4d rotLon = Mat4d::zrotation(gridStepMeridianRad); Mat4d rotLon = Mat4d::zrotation(gridStepMeridianRad);
Vec3d fpt = firstPoint; Vec3d fpt = firstPoint;
Vec3d p1, p2; Vec3d p1, p2;
int maxNbIter = (int)(M_PI/gridStepMeridianRad); int maxNbIter = (int)(M_PI/gridStepMeridianRad);
int i; int i;
for (i=0; i<maxNbIter; ++i) for (i=0; i<maxNbIter; ++i)
{ {
StelUtils::rectToSphe(&lon2, &lat2, fpt); StelUtils::rectToSphe(&lon2, &lat2, fpt);
userData.raAngle = lon2; userData.raAngle = lon2;
meridianHalfSpace.n = fpt^Vec3d(0,0,1); meridianSphericalCap.n = fpt^Vec3d(0,0,1);
meridianHalfSpace.n.normalize(); meridianSphericalCap.n.normalize();
if (!planeIntersect2(viewPortHalfSpace, meridianHalfSpace, p if (!SphericalCap::intersectionPoints(viewPortSphericalCap,
1, p2)) meridianSphericalCap, p1, p2))
{ {
if (viewPortHalfSpace.d<meridianHalfSpace.d && viewP ortHalfSpace.contains(meridianHalfSpace.n)) if (viewPortSphericalCap.d<meridianSphericalCap.d && viewPortSphericalCap.contains(meridianSphericalCap.n))
{ {
// The meridian is fully included in the vie wport, draw it in 3 sub-arcs to avoid length > 180. // The meridian is fully included in the vie wport, draw it in 3 sub-arcs to avoid length > 180.
Mat4d rotLon120 = Mat4d::rotation(meridianHa lfSpace.n, 120.*M_PI/180.); const Mat4d& rotLon120 = Mat4d::rotation(mer idianSphericalCap.n, 120.*M_PI/180.);
Vec3d rotFpt=fpt; Vec3d rotFpt=fpt;
rotFpt.transfo4d(rotLon120); rotFpt.transfo4d(rotLon120);
Vec3d rotFpt2=rotFpt; Vec3d rotFpt2=rotFpt;
rotFpt2.transfo4d(rotLon120); rotFpt2.transfo4d(rotLon120);
sPainter.drawSmallCircleArc(fpt, rotFpt, Vec sPainter.drawGreatCircleArc(fpt, rotFpt, NUL
3d(0,0,0), viewportEdgeIntersectCallback, &userData); L, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt, rotFpt2, sPainter.drawGreatCircleArc(rotFpt, rotFpt2,
Vec3d(0,0,0), viewportEdgeIntersectCallback, &userData); NULL, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt2, fpt, Ve sPainter.drawGreatCircleArc(rotFpt2, fpt, NU
c3d(0,0,0), viewportEdgeIntersectCallback, &userData); LL, viewportEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
continue; continue;
} }
else else
break; break;
} }
Vec3d middlePoint = p1+p2; Vec3d middlePoint = p1+p2;
middlePoint.normalize(); middlePoint.normalize();
if (!viewPortHalfSpace.contains(middlePoint)) if (!viewPortSphericalCap.contains(middlePoint))
middlePoint*=-1.; middlePoint*=-1.;
// Draw the arc in 2 sub-arcs to avoid lengths > 180 deg // Draw the arc in 2 sub-arcs to avoid lengths > 180 deg
sPainter.drawSmallCircleArc(p1, middlePoint, Vec3d(0), viewp sPainter.drawGreatCircleArc(p1, middlePoint, NULL, viewportE
ortEdgeIntersectCallback, &userData); dgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(p2, middlePoint, Vec3d(0), viewp sPainter.drawGreatCircleArc(p2, middlePoint, NULL, viewportE
ortEdgeIntersectCallback, &userData); dgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
} }
if (i!=maxNbIter) if (i!=maxNbIter)
{ {
rotLon = Mat4d::rotation(Vec3d(0,0,1), -gridStepMeridianRad) ; rotLon = Mat4d::zrotation(-gridStepMeridianRad);
fpt = firstPoint; fpt = firstPoint;
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
for (int j=0; j<maxNbIter-i; ++j) for (int j=0; j<maxNbIter-i; ++j)
{ {
StelUtils::rectToSphe(&lon2, &lat2, fpt); StelUtils::rectToSphe(&lon2, &lat2, fpt);
userData.raAngle = lon2; userData.raAngle = lon2;
meridianHalfSpace.n = fpt^Vec3d(0,0,1); meridianSphericalCap.n = fpt^Vec3d(0,0,1);
meridianHalfSpace.n.normalize(); meridianSphericalCap.n.normalize();
if (!planeIntersect2(viewPortHalfSpace, meridianHalf if (!SphericalCap::intersectionPoints(viewPortSpheri
Space, p1, p2)) calCap, meridianSphericalCap, p1, p2))
break; break;
Vec3d middlePoint = p1+p2; Vec3d middlePoint = p1+p2;
middlePoint.normalize(); middlePoint.normalize();
if (!viewPortHalfSpace.contains(middlePoint)) if (!viewPortSphericalCap.contains(middlePoint))
middlePoint*=-1; middlePoint*=-1;
sPainter.drawSmallCircleArc(p1, middlePoint, Vec3d(0 sPainter.drawGreatCircleArc(p1, middlePoint, NULL, v
), viewportEdgeIntersectCallback, &userData); iewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(p2, middlePoint, Vec3d(0 sPainter.drawGreatCircleArc(p2, middlePoint, NULL, v
), viewportEdgeIntersectCallback, &userData); iewportEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
} }
} }
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Draw all the parallels (small circles) // Draw all the parallels (small circles)
StelGeom::HalfSpace parallelHalfSpace(Vec3d(0,0,1), 0); SphericalCap parallelSphericalCap(Vec3d(0,0,1), 0);
rotLon = Mat4d::rotation(firstPoint^Vec3d(0,0,1), gridStepParallelRa d); rotLon = Mat4d::rotation(firstPoint^Vec3d(0,0,1), gridStepParallelRa d);
fpt = firstPoint; fpt = firstPoint;
maxNbIter = (int)(M_PI/gridStepParallelRad)-1; maxNbIter = (int)(M_PI/gridStepParallelRad)-1;
for (i=0; i<maxNbIter; ++i) for (i=0; i<maxNbIter; ++i)
{ {
StelUtils::rectToSphe(&lon2, &lat2, fpt); StelUtils::rectToSphe(&lon2, &lat2, fpt);
userData.text = StelUtils::radToDmsStrAdapt(lat2); userData.text = StelUtils::radToDmsStrAdapt(lat2);
parallelHalfSpace.d = fpt[2]; parallelSphericalCap.d = fpt[2];
if (parallelHalfSpace.d>0.9999999) if (parallelSphericalCap.d>0.9999999)
break; break;
const Vec3d rotCenter(0,0,parallelHalfSpace.d); const Vec3d rotCenter(0,0,parallelSphericalCap.d);
if (!planeIntersect2(viewPortHalfSpace, parallelHalfSpace, p if (!SphericalCap::intersectionPoints(viewPortSphericalCap,
1, p2)) parallelSphericalCap, p1, p2))
{ {
if ((viewPortHalfSpace.d<parallelHalfSpace.d && view if ((viewPortSphericalCap.d<parallelSphericalCap.d &
PortHalfSpace.contains(parallelHalfSpace.n)) & viewPortSphericalCap.contains(parallelSphericalCap.n))
|| (viewPortHalfSpace.d<-parallelHalfSpace.d || (viewPortSphericalCap.d<-parallelSpherica
&& viewPortHalfSpace.contains(-parallelHalfSpace.n))) lCap.d && viewPortSphericalCap.contains(-parallelSphericalCap.n)))
{ {
// The parallel is fully included in the vie wport, draw it in 3 sub-arcs to avoid lengths >= 180 deg // The parallel is fully included in the vie wport, draw it in 3 sub-arcs to avoid lengths >= 180 deg
Mat4d rotLon120 = Mat4d::rotation(Vec3d(0,0, 1), 120.*M_PI/180.); static const Mat4d rotLon120 = Mat4d::zrotat ion(120.*M_PI/180.);
Vec3d rotFpt=fpt; Vec3d rotFpt=fpt;
rotFpt.transfo4d(rotLon120); rotFpt.transfo4d(rotLon120);
Vec3d rotFpt2=rotFpt; Vec3d rotFpt2=rotFpt;
rotFpt2.transfo4d(rotLon120); rotFpt2.transfo4d(rotLon120);
sPainter.drawSmallCircleArc(fpt, rotFpt, rot Center, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(fpt, rotFpt, rot Center, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt, rotFpt2, rotCenter, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(rotFpt, rotFpt2, rotCenter, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt2, fpt, ro tCenter, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(rotFpt2, fpt, ro tCenter, viewportEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
continue; continue;
} }
else else
break; break;
} }
// Draw the arc in 2 sub-arcs to avoid lengths > 180 deg // Draw the arc in 2 sub-arcs to avoid lengths > 180 deg
Vec3d middlePoint = p1-rotCenter+p2-rotCenter; Vec3d middlePoint = p1-rotCenter+p2-rotCenter;
middlePoint.normalize(); middlePoint.normalize();
middlePoint*=(p1-rotCenter).length(); middlePoint*=(p1-rotCenter).length();
middlePoint+=rotCenter; middlePoint+=rotCenter;
if (!viewPortHalfSpace.contains(middlePoint)) if (!viewPortSphericalCap.contains(middlePoint))
{ {
middlePoint-=rotCenter; middlePoint-=rotCenter;
middlePoint*=-1.; middlePoint*=-1.;
middlePoint+=rotCenter; middlePoint+=rotCenter;
} }
sPainter.drawSmallCircleArc(p1, middlePoint, rotCenter, view portEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(p1, middlePoint, rotCenter, view portEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(p2, middlePoint, rotCenter, view portEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(p2, middlePoint, rotCenter, view portEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
skipping to change at line 443 skipping to change at line 436
if (i!=maxNbIter) if (i!=maxNbIter)
{ {
rotLon = Mat4d::rotation(firstPoint^Vec3d(0,0,1), -gridStepP arallelRad); rotLon = Mat4d::rotation(firstPoint^Vec3d(0,0,1), -gridStepP arallelRad);
fpt = firstPoint; fpt = firstPoint;
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
for (int j=0; j<maxNbIter-i; ++j) for (int j=0; j<maxNbIter-i; ++j)
{ {
StelUtils::rectToSphe(&lon2, &lat2, fpt); StelUtils::rectToSphe(&lon2, &lat2, fpt);
userData.text = StelUtils::radToDmsStrAdapt(lat2); userData.text = StelUtils::radToDmsStrAdapt(lat2);
parallelHalfSpace.d = fpt[2]; parallelSphericalCap.d = fpt[2];
const Vec3d rotCenter(0,0,parallelHalfSpace.d); const Vec3d rotCenter(0,0,parallelSphericalCap.d);
if (!planeIntersect2(viewPortHalfSpace, parallelHalf if (!SphericalCap::intersectionPoints(viewPortSpheri
Space, p1, p2)) calCap, parallelSphericalCap, p1, p2))
{ {
if ((viewPortHalfSpace.d<parallelHalfSpace.d if ((viewPortSphericalCap.d<parallelSpherica
&& viewPortHalfSpace.contains(parallelHalfSpace.n)) lCap.d && viewPortSphericalCap.contains(parallelSphericalCap.n))
|| (viewPortHalfSpace.d<-parallelHa || (viewPortSphericalCap.d<-paralle
lfSpace.d && viewPortHalfSpace.contains(-parallelHalfSpace.n))) lSphericalCap.d && viewPortSphericalCap.contains(-parallelSphericalCap.n)))
{ {
// The parallel is fully included in the viewport, draw it in 3 sub-arcs to avoid lengths >= 180 deg // The parallel is fully included in the viewport, draw it in 3 sub-arcs to avoid lengths >= 180 deg
Mat4d rotLon120 = Mat4d::rotation(Ve c3d(0,0,1), 120.*M_PI/180.); static const Mat4d rotLon120 = Mat4d ::zrotation(120.*M_PI/180.);
Vec3d rotFpt=fpt; Vec3d rotFpt=fpt;
rotFpt.transfo4d(rotLon120); rotFpt.transfo4d(rotLon120);
Vec3d rotFpt2=rotFpt; Vec3d rotFpt2=rotFpt;
rotFpt2.transfo4d(rotLon120); rotFpt2.transfo4d(rotLon120);
sPainter.drawSmallCircleArc(fpt, rot Fpt, rotCenter, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(fpt, rot Fpt, rotCenter, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt, rotFpt2, rotCenter, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(rotFpt, rotFpt2, rotCenter, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt2, fpt, rotCenter, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(rotFpt2, fpt, rotCenter, viewportEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
continue; continue;
} }
else else
break; break;
} }
// Draw the arc in 2 sub-arcs to avoid lengths > 180 deg // Draw the arc in 2 sub-arcs to avoid lengths > 180 deg
Vec3d middlePoint = p1-rotCenter+p2-rotCenter; Vec3d middlePoint = p1-rotCenter+p2-rotCenter;
middlePoint.normalize(); middlePoint.normalize();
middlePoint*=(p1-rotCenter).length(); middlePoint*=(p1-rotCenter).length();
middlePoint+=rotCenter; middlePoint+=rotCenter;
if (!viewPortHalfSpace.contains(middlePoint)) if (!viewPortSphericalCap.contains(middlePoint))
{ {
middlePoint-=rotCenter; middlePoint-=rotCenter;
middlePoint*=-1.; middlePoint*=-1.;
middlePoint+=rotCenter; middlePoint+=rotCenter;
} }
sPainter.drawSmallCircleArc(p1, middlePoint, rotCent er, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(p1, middlePoint, rotCent er, viewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(p2, middlePoint, rotCent er, viewportEdgeIntersectCallback, &userData); sPainter.drawSmallCircleArc(p2, middlePoint, rotCent er, viewportEdgeIntersectCallback, &userData);
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
} }
} }
} }
SkyLine::SkyLine(SKY_LINE_TYPE _line_type) : color(0.f, 0.f, 1.f), fontSize SkyLine::SkyLine(SKY_LINE_TYPE _line_type) : color(0.f, 0.f, 1.f)
(14.),
font(StelApp::getInstance().getFontManager().getStandardFont(StelApp::getIn
stance().getLocaleMgr().getAppLanguage(), fontSize))
{ {
font.setPixelSize(14);
line_type = _line_type; line_type = _line_type;
switch (line_type) switch (line_type)
{ {
case MERIDIAN: case MERIDIAN:
frameType = StelCore::FrameAltAz; frameType = StelCore::FrameAltAz;
label = q_("Meridian"); label = q_("Meridian");
break; break;
case ECLIPTIC: case ECLIPTIC:
frameType = StelCore::FrameObservercentricEcliptic; frameType = StelCore::FrameObservercentricEcliptic;
skipping to change at line 514 skipping to change at line 507
break; break;
} }
} }
SkyLine::~SkyLine() SkyLine::~SkyLine()
{ {
} }
void SkyLine::setFontSize(double newFontSize) void SkyLine::setFontSize(double newFontSize)
{ {
fontSize = newFontSize; font.setPixelSize(newFontSize);
font = StelApp::getInstance().getFontManager().getStandardFont(StelA
pp::getInstance().getLocaleMgr().getAppLanguage(), fontSize);
} }
void SkyLine::draw(StelCore *core) const void SkyLine::draw(StelCore *core) const
{ {
if (!fader.getInterstate()) if (!fader.getInterstate())
return; return;
StelProjectorP prj = core->getProjection(frameType); StelProjectorP prj = core->getProjection(frameType);
// Get the bounding halfspace // Get the bounding halfspace
const StelGeom::HalfSpace viewPortHalfSpace = prj->getBoundingHalfSp ace(); const SphericalCap viewPortSphericalCap = prj->getBoundingSphericalC ap();
// Initialize a painter and set openGL state // Initialize a painter and set openGL state
StelPainter sPainter(prj); StelPainter sPainter(prj);
glColor4f(color[0], color[1], color[2], fader.getInterstate()); sPainter.setColor(color[0], color[1], color[2], fader.getInterstate(
glDisable(GL_TEXTURE_2D); ));
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transpa rency mode glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal transpa rency mode
glEnable(GL_LINE_SMOOTH);
Vec4f textColor(color[0], color[1], color[2], 0); Vec4f textColor(color[0], color[1], color[2], 0);
textColor*=2; textColor*=2;
textColor[3]=fader.getInterstate(); textColor[3]=fader.getInterstate();
ViewportEdgeIntersectCallbackData userData(sPainter); ViewportEdgeIntersectCallbackData userData(&sPainter);
userData.font = &font; sPainter.setFont(font);
userData.textColor = textColor; userData.textColor = textColor;
userData.text = label; userData.text = label;
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Draw the line // Draw the line
StelGeom::HalfSpace meridianHalfSpace(Vec3d(0,0,1), 0); SphericalCap meridianSphericalCap(Vec3d(0,0,1), 0);
Vec3d fpt(1,0,0); Vec3d fpt(1,0,0);
if (line_type==MERIDIAN) if (line_type==MERIDIAN)
{ {
meridianHalfSpace.n.set(0,1,0); meridianSphericalCap.n.set(0,1,0);
} }
Vec3d p1, p2; Vec3d p1, p2;
if (!planeIntersect2(viewPortHalfSpace, meridianHalfSpace, p1, p2)) if (!SphericalCap::intersectionPoints(viewPortSphericalCap, meridian SphericalCap, p1, p2))
{ {
if ((viewPortHalfSpace.d<meridianHalfSpace.d && viewPortHalf if ((viewPortSphericalCap.d<meridianSphericalCap.d && viewPo
Space.contains(meridianHalfSpace.n)) rtSphericalCap.contains(meridianSphericalCap.n))
|| (viewPortHalfSpace.d<-meridianHalfSpace.d && viewPort || (viewPortSphericalCap.d<-meridianSphericalCap.d &
HalfSpace.contains(-meridianHalfSpace.n))) & viewPortSphericalCap.contains(-meridianSphericalCap.n)))
{ {
// The meridian is fully included in the viewport, d raw it in 3 sub-arcs to avoid length > 180. // The meridian is fully included in the viewport, d raw it in 3 sub-arcs to avoid length > 180.
Mat4d rotLon120 = Mat4d::rotation(meridianHalfSpace. n, 120.*M_PI/180.); const Mat4d& rotLon120 = Mat4d::rotation(meridianSph ericalCap.n, 120.*M_PI/180.);
Vec3d rotFpt=fpt; Vec3d rotFpt=fpt;
rotFpt.transfo4d(rotLon120); rotFpt.transfo4d(rotLon120);
Vec3d rotFpt2=rotFpt; Vec3d rotFpt2=rotFpt;
rotFpt2.transfo4d(rotLon120); rotFpt2.transfo4d(rotLon120);
sPainter.drawSmallCircleArc(fpt, rotFpt, Vec3d(0,0,0 sPainter.drawGreatCircleArc(fpt, rotFpt, NULL, viewp
), viewportEdgeIntersectCallback, &userData); ortEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt, rotFpt2, Vec3d(0 sPainter.drawGreatCircleArc(rotFpt, rotFpt2, NULL, v
,0,0), viewportEdgeIntersectCallback, &userData); iewportEdgeIntersectCallback, &userData);
sPainter.drawSmallCircleArc(rotFpt2, fpt, Vec3d(0,0, sPainter.drawGreatCircleArc(rotFpt2, fpt, NULL, view
0), viewportEdgeIntersectCallback, &userData); portEdgeIntersectCallback, &userData);
return; return;
} }
else else
return; return;
} }
Vec3d middlePoint = p1+p2; Vec3d middlePoint = p1+p2;
middlePoint.normalize(); middlePoint.normalize();
if (!viewPortHalfSpace.contains(middlePoint)) if (!viewPortSphericalCap.contains(middlePoint))
middlePoint*=-1.; middlePoint*=-1.;
// Draw the arc in 2 sub-arcs to avoid lengths > 180 deg // Draw the arc in 2 sub-arcs to avoid lengths > 180 deg
sPainter.drawSmallCircleArc(p1, middlePoint, Vec3d(0,0,0), viewportE sPainter.drawGreatCircleArc(p1, middlePoint, NULL, viewportEdgeInter
dgeIntersectCallback, &userData); sectCallback, &userData);
sPainter.drawSmallCircleArc(p2, middlePoint, Vec3d(0,0,0), viewportE sPainter.drawGreatCircleArc(p2, middlePoint, NULL, viewportEdgeInter
dgeIntersectCallback, &userData); sectCallback, &userData);
// // Johannes: use a big radius as a dirty workaround for the bug that the // // Johannes: use a big radius as a dirty workaround for the bug that the
// // ecliptic line is not drawn around the observer, but around the su n: // // ecliptic line is not drawn around the observer, but around the su n:
// const Vec3d vv(1000000,0,0); // const Vec3d vv(1000000,0,0);
} }
GridLinesMgr::GridLinesMgr() GridLinesMgr::GridLinesMgr()
{ {
setObjectName("GridLinesMgr"); setObjectName("GridLinesMgr");
equGrid = new SkyGrid(StelCore::FrameEquinoxEqu); equGrid = new SkyGrid(StelCore::FrameEquinoxEqu);
equJ2000Grid = new SkyGrid(StelCore::FrameJ2000); equJ2000Grid = new SkyGrid(StelCore::FrameJ2000);
galacticGrid = new SkyGrid(StelCore::FrameGalactic);
aziGrid = new SkyGrid(StelCore::FrameAltAz); aziGrid = new SkyGrid(StelCore::FrameAltAz);
equatorLine = new SkyLine(SkyLine::EQUATOR); equatorLine = new SkyLine(SkyLine::EQUATOR);
eclipticLine = new SkyLine(SkyLine::ECLIPTIC); eclipticLine = new SkyLine(SkyLine::ECLIPTIC);
meridianLine = new SkyLine(SkyLine::MERIDIAN); meridianLine = new SkyLine(SkyLine::MERIDIAN);
} }
GridLinesMgr::~GridLinesMgr() GridLinesMgr::~GridLinesMgr()
{ {
delete equGrid; delete equGrid;
delete equJ2000Grid; delete equJ2000Grid;
delete galacticGrid;
delete aziGrid; delete aziGrid;
delete equatorLine; delete equatorLine;
delete eclipticLine; delete eclipticLine;
delete meridianLine; delete meridianLine;
} }
/************************************************************************* /*************************************************************************
Reimplementation of the getCallOrder method Reimplementation of the getCallOrder method
*************************************************************************/ *************************************************************************/
double GridLinesMgr::getCallOrder(StelModuleActionName actionName) const double GridLinesMgr::getCallOrder(StelModuleActionName actionName) const
skipping to change at line 629 skipping to change at line 621
} }
void GridLinesMgr::init() void GridLinesMgr::init()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
setFlagAzimuthalGrid(conf->value("viewing/flag_azimuthal_grid").toBo ol()); setFlagAzimuthalGrid(conf->value("viewing/flag_azimuthal_grid").toBo ol());
setFlagEquatorGrid(conf->value("viewing/flag_equatorial_grid").toBoo l()); setFlagEquatorGrid(conf->value("viewing/flag_equatorial_grid").toBoo l());
setFlagEquatorJ2000Grid(conf->value("viewing/flag_equatorial_J2000_g rid").toBool()); setFlagEquatorJ2000Grid(conf->value("viewing/flag_equatorial_J2000_g rid").toBool());
setFlagGalacticGrid(conf->value("viewing/flag_galactic_grid").toBool ());
setFlagEquatorLine(conf->value("viewing/flag_equator_line").toBool() ); setFlagEquatorLine(conf->value("viewing/flag_equator_line").toBool() );
setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").toBool ()); setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").toBool ());
setFlagMeridianLine(conf->value("viewing/flag_meridian_line").toBool ()); setFlagMeridianLine(conf->value("viewing/flag_meridian_line").toBool ());
} }
void GridLinesMgr::update(double deltaTime) void GridLinesMgr::update(double deltaTime)
{ {
// Update faders // Update faders
equGrid->update(deltaTime); equGrid->update(deltaTime);
equJ2000Grid->update(deltaTime); equJ2000Grid->update(deltaTime);
galacticGrid->update(deltaTime);
aziGrid->update(deltaTime); aziGrid->update(deltaTime);
equatorLine->update(deltaTime); equatorLine->update(deltaTime);
eclipticLine->update(deltaTime); eclipticLine->update(deltaTime);
meridianLine->update(deltaTime); meridianLine->update(deltaTime);
} }
void GridLinesMgr::draw(StelCore* core) void GridLinesMgr::draw(StelCore* core)
{ {
// Draw the equatorial grid
equGrid->draw(core); equGrid->draw(core);
// Draw the equatorial grid galacticGrid->draw(core);
equJ2000Grid->draw(core); equJ2000Grid->draw(core);
// Draw the altazimuthal grid
aziGrid->draw(core); aziGrid->draw(core);
// Draw the celestial equator line
equatorLine->draw(core); equatorLine->draw(core);
// Draw the ecliptic line
eclipticLine->draw(core); eclipticLine->draw(core);
// Draw the meridian line
meridianLine->draw(core); meridianLine->draw(core);
} }
void GridLinesMgr::setStelStyle(const StelStyle& style) void GridLinesMgr::setStelStyle(const StelStyle& style)
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
QString section = style.confSectionName; QString section = style.confSectionName;
// Load colors from config file // Load colors from config file
QString defaultColor = conf->value(section+"/default_color").toStrin g(); QString defaultColor = conf->value(section+"/default_color").toStrin g();
setColorEquatorGrid(StelUtils::strToVec3f(conf->value(section+"/equa torial_color", defaultColor).toString())); setColorEquatorGrid(StelUtils::strToVec3f(conf->value(section+"/equa torial_color", defaultColor).toString()));
setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value(section+" /equatorial_J2000_color", defaultColor).toString())); setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value(section+" /equatorial_J2000_color", defaultColor).toString()));
setColorGalacticGrid(StelUtils::strToVec3f(conf->value(section+"/gal actic_color", defaultColor).toString()));
setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value(section+"/az imuthal_color", defaultColor).toString())); setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value(section+"/az imuthal_color", defaultColor).toString()));
setColorEquatorLine(StelUtils::strToVec3f(conf->value(section+"/equa tor_color", defaultColor).toString())); setColorEquatorLine(StelUtils::strToVec3f(conf->value(section+"/equa tor_color", defaultColor).toString()));
setColorEclipticLine(StelUtils::strToVec3f(conf->value(section+"/ecl iptic_color", defaultColor).toString())); setColorEclipticLine(StelUtils::strToVec3f(conf->value(section+"/ecl iptic_color", defaultColor).toString()));
setColorMeridianLine(StelUtils::strToVec3f(conf->value(section+"/mer idian_color", defaultColor).toString())); setColorMeridianLine(StelUtils::strToVec3f(conf->value(section+"/mer idian_color", defaultColor).toString()));
} }
//! Set flag for displaying Azimuthal Grid //! Set flag for displaying Azimuthal Grid
void GridLinesMgr::setFlagAzimuthalGrid(bool b) {aziGrid->setFlagshow(b);} void GridLinesMgr::setFlagAzimuthalGrid(bool b) {aziGrid->setFlagshow(b);}
//! Get flag for displaying Azimuthal Grid //! Get flag for displaying Azimuthal Grid
bool GridLinesMgr::getFlagAzimuthalGrid(void) const {return aziGrid->getFla gshow();} bool GridLinesMgr::getFlagAzimuthalGrid(void) const {return aziGrid->getFla gshow();}
skipping to change at line 694 skipping to change at line 684
//! Get flag for displaying Equatorial Grid //! Get flag for displaying Equatorial Grid
bool GridLinesMgr::getFlagEquatorGrid(void) const {return equGrid->getFlags how();} bool GridLinesMgr::getFlagEquatorGrid(void) const {return equGrid->getFlags how();}
Vec3f GridLinesMgr::getColorEquatorGrid(void) const {return equGrid->getCol or();} Vec3f GridLinesMgr::getColorEquatorGrid(void) const {return equGrid->getCol or();}
//! Set flag for displaying Equatorial J2000 Grid //! Set flag for displaying Equatorial J2000 Grid
void GridLinesMgr::setFlagEquatorJ2000Grid(bool b) {equJ2000Grid->setFlagsh ow(b);} void GridLinesMgr::setFlagEquatorJ2000Grid(bool b) {equJ2000Grid->setFlagsh ow(b);}
//! Get flag for displaying Equatorial J2000 Grid //! Get flag for displaying Equatorial J2000 Grid
bool GridLinesMgr::getFlagEquatorJ2000Grid(void) const {return equJ2000Grid ->getFlagshow();} bool GridLinesMgr::getFlagEquatorJ2000Grid(void) const {return equJ2000Grid ->getFlagshow();}
Vec3f GridLinesMgr::getColorEquatorJ2000Grid(void) const {return equJ2000Gr id->getColor();} Vec3f GridLinesMgr::getColorEquatorJ2000Grid(void) const {return equJ2000Gr id->getColor();}
//! Set flag for displaying Equatorial J2000 Grid
void GridLinesMgr::setFlagGalacticGrid(bool b) {galacticGrid->setFlagshow(b
);}
//! Get flag for displaying Equatorial J2000 Grid
bool GridLinesMgr::getFlagGalacticGrid(void) const {return galacticGrid->ge
tFlagshow();}
Vec3f GridLinesMgr::getColorGalacticGrid(void) const {return galacticGrid->
getColor();}
//! Set flag for displaying Equatorial Line //! Set flag for displaying Equatorial Line
void GridLinesMgr::setFlagEquatorLine(bool b) {equatorLine->setFlagshow(b); } void GridLinesMgr::setFlagEquatorLine(bool b) {equatorLine->setFlagshow(b); }
//! Get flag for displaying Equatorial Line //! Get flag for displaying Equatorial Line
bool GridLinesMgr::getFlagEquatorLine(void) const {return equatorLine->getF lagshow();} bool GridLinesMgr::getFlagEquatorLine(void) const {return equatorLine->getF lagshow();}
Vec3f GridLinesMgr::getColorEquatorLine(void) const {return equatorLine->ge tColor();} Vec3f GridLinesMgr::getColorEquatorLine(void) const {return equatorLine->ge tColor();}
//! Set flag for displaying Ecliptic Line //! Set flag for displaying Ecliptic Line
void GridLinesMgr::setFlagEclipticLine(bool b) {eclipticLine->setFlagshow(b );} void GridLinesMgr::setFlagEclipticLine(bool b) {eclipticLine->setFlagshow(b );}
//! Get flag for displaying Ecliptic Line //! Get flag for displaying Ecliptic Line
bool GridLinesMgr::getFlagEclipticLine(void) const {return eclipticLine->ge tFlagshow();} bool GridLinesMgr::getFlagEclipticLine(void) const {return eclipticLine->ge tFlagshow();}
skipping to change at line 715 skipping to change at line 711
//! Set flag for displaying Meridian Line //! Set flag for displaying Meridian Line
void GridLinesMgr::setFlagMeridianLine(bool b) {meridianLine->setFlagshow(b );} void GridLinesMgr::setFlagMeridianLine(bool b) {meridianLine->setFlagshow(b );}
//! Get flag for displaying Meridian Line //! Get flag for displaying Meridian Line
bool GridLinesMgr::getFlagMeridianLine(void) const {return meridianLine->ge tFlagshow();} bool GridLinesMgr::getFlagMeridianLine(void) const {return meridianLine->ge tFlagshow();}
Vec3f GridLinesMgr::getColorMeridianLine(void) const {return meridianLine-> getColor();} Vec3f GridLinesMgr::getColorMeridianLine(void) const {return meridianLine-> getColor();}
void GridLinesMgr::setColorAzimuthalGrid(const Vec3f& v) { aziGrid->setColo r(v);} void GridLinesMgr::setColorAzimuthalGrid(const Vec3f& v) { aziGrid->setColo r(v);}
void GridLinesMgr::setColorEquatorGrid(const Vec3f& v) { equGrid->setColor( v);} void GridLinesMgr::setColorEquatorGrid(const Vec3f& v) { equGrid->setColor( v);}
void GridLinesMgr::setColorEquatorJ2000Grid(const Vec3f& v) { equJ2000Grid- >setColor(v);} void GridLinesMgr::setColorEquatorJ2000Grid(const Vec3f& v) { equJ2000Grid- >setColor(v);}
void GridLinesMgr::setColorGalacticGrid(const Vec3f& v) { galacticGrid->set Color(v);}
void GridLinesMgr::setColorEquatorLine(const Vec3f& v) { equatorLine->setCo lor(v);} void GridLinesMgr::setColorEquatorLine(const Vec3f& v) { equatorLine->setCo lor(v);}
void GridLinesMgr::setColorEclipticLine(const Vec3f& v) { eclipticLine->set Color(v);} void GridLinesMgr::setColorEclipticLine(const Vec3f& v) { eclipticLine->set Color(v);}
void GridLinesMgr::setColorMeridianLine(const Vec3f& v) { meridianLine->set Color(v);} void GridLinesMgr::setColorMeridianLine(const Vec3f& v) { meridianLine->set Color(v);}
 End of changes. 74 change blocks. 
128 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/