• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | List of all members
EquirectangularProjector Class Reference

#include <equirectangularprojector.h>

Inheritance diagram for EquirectangularProjector:
Inheritance graph
[legend]

Public Member Functions

 EquirectangularProjector (const ViewParams &p)
 
virtual SkyPoint fromScreen (const QPointF &p, dms *LST, const dms *lat) const
 
virtual QVector< Vector2f > groundPoly (SkyPoint *labelpoint=0, bool *drawLabel=0) const
 
virtual double radius () const
 
virtual Vector2f toScreenVec (const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=0) const
 
virtual SkyMap::Projection type () const
 
virtual bool unusablePoint (const QPointF &p) const
 
- Public Member Functions inherited from Projector
 Projector (const ViewParams &p)
 
virtual ~Projector ()
 
bool checkVisibility (SkyPoint *p) const
 
QPointF clipLine (SkyPoint *p1, SkyPoint *p2) const
 
Vector2f clipLineVec (SkyPoint *p1, SkyPoint *p2) const
 
double findPA (SkyObject *o, float x, float y) const
 
double fov () const
 
bool onScreen (const QPointF &p) const
 
bool onScreen (const Vector2f &p) const
 
void setViewParams (const ViewParams &p)
 
QPointF toScreen (const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=0) const
 

Additional Inherited Members

- Protected Member Functions inherited from Projector
virtual double cosMaxFieldAngle () const
 
virtual double projectionK (double x) const
 
virtual double projectionL (double x) const
 
- Static Protected Member Functions inherited from Projector
static SkyPoint pointAt (double az, KStarsData *data)
 
- Protected Attributes inherited from Projector
double m_cosY0
 
KStarsData * m_data
 
double m_fov
 
double m_sinY0
 
ViewParams m_vp
 

Detailed Description

Definition at line 27 of file equirectangularprojector.h.

Constructor & Destructor Documentation

EquirectangularProjector::EquirectangularProjector ( const ViewParams &  p)
explicit

Definition at line 27 of file equirectangularprojector.cpp.

Member Function Documentation

SkyPoint EquirectangularProjector::fromScreen ( const QPointF &  p,
dms *  LST,
const dms *  lat 
) const
virtual

Determine RA, Dec coordinates of the pixel at (dx, dy), which are the screen pixel coordinate offsets from the center of the Sky pixmap.

Parameters
thescreen pixel position to convert
LSTpointer to the local sidereal time, as a dms object.
latpointer to the current geographic laitude, as a dms object

N.B. We don't cache these sin/cos values in the inverse projection because it causes 'shaking' when moving the sky.

Reimplemented from Projector.

Definition at line 73 of file equirectangularprojector.cpp.

QVector< Vector2f > EquirectangularProjector::groundPoly ( SkyPoint *  labelpoint = 0,
bool *  drawLabel = 0 
) const
virtual

Get the ground polygon.

Parameters
labelpointThis point will be set to something suitable for attaching a label
drawLabelthis tells whether to draw a label.
Returns
the ground polygon

Reimplemented from Projector.

Definition at line 109 of file equirectangularprojector.cpp.

double EquirectangularProjector::radius ( ) const
virtual

Get the radius of this projection's sky circle.

Returns
the radius in radians

Reimplemented from Projector.

Definition at line 38 of file equirectangularprojector.cpp.

Vector2f EquirectangularProjector::toScreenVec ( const SkyPoint *  o,
bool  oRefract = true,
bool *  onVisibleHemisphere = 0 
) const
virtual

Given the coordinates of the SkyPoint argument, determine the pixel coordinates in the SkyMap.

Since most of the projections used by KStars are very similar, if this function were to be reimplemented in each projection subclass we would end up changing maybe 5 or 6 lines out of 150. Instead, we have a default implementation that uses the projectionK and projectionL functions to take care of the differences between e.g. Orthographic and Stereographic. There is also the cosMaxFieldAngle function, which is used for testing whether a point is on the visible part of the projection, and the radius function which gives the radius of the projection in screen coordinates.

While this seems ugly, it is less ugly than duplicating 150 loc to change 5.

Returns
Vector2f containing screen pixel x, y coordinates of SkyPoint.
Parameters
opointer to the SkyPoint for which to calculate x, y coordinates.
oRefracttrue = use Options::useRefraction() value. false = do not use refraction. This argument is only needed for the Horizon, which should never be refracted.
onVisibleHemispherepointer to a bool to indicate whether the point is on the visible part of the Celestial Sphere.

Reimplemented from Projector.

Definition at line 43 of file equirectangularprojector.cpp.

SkyMap::Projection EquirectangularProjector::type ( ) const
virtual

Return the type of this projection.

Implements Projector.

Definition at line 33 of file equirectangularprojector.cpp.

bool EquirectangularProjector::unusablePoint ( const QPointF &  p) const
virtual

Check if the current point on screen is a valid point on the sky.

This is needed to avoid a crash of the program if the user clicks on a point outside the sky (the corners of the sky map at the lowest zoom level are the invalid points).

Parameters
pthe screen pixel position

Reimplemented from Projector.

Definition at line 102 of file equirectangularprojector.cpp.


The documentation for this class was generated from the following files:
  • equirectangularprojector.h
  • equirectangularprojector.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:22 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal