Stellarium  26.3
Public Types | Signals | Public Member Functions | Static Public Member Functions | Properties | Friends
HipsSurvey Class Reference

Public Types

enum  ColorChannel { ColorChannelRgb = 0 , ColorChannelRed = 1 , ColorChannelGreen = 2 , ColorChannelBlue = 3 }
 
typedef std::function< void(const QVector< Vec3d > &verts, const QVector< Vec2f > &tex, const QVector< uint16_t > &indices)> DrawCallback
 

Signals

void propertiesChanged (void)
 
void statusChanged (void)
 
void visibleChanged (bool)
 
void displaySettingsChanged (void)
 

Public Member Functions

 HipsSurvey (const QString &url, const QString &group, const QString &frame, const QString &type, const QMap< QString, QString > &hipslistProps, double releaseDate=0.0)
 Create a new HipsSurvey from its url. More...
 
bool isVisible () const
 Get whether the survey is visible.
 
void setVisible (bool value)
 Define whether the survey should be visible.
 
float getInterstate () const
 
void hideProgressBar ()
 
void draw (StelPainter *sPainter, double angle=2.0 *M_PI, DrawCallback callback=Q_NULLPTR, bool withAtmosphericExtinction=false)
 Render the survey. More...
 
const QString & getUrl () const
 Return the source URL of the survey.
 
QString getFrame () const
 Return the frame name of the survey (its hips_frame property).
 
QString getType () const
 Return the type of the survey (its type property).
 
QString getGroup () const
 Return the group of of color/normals/horizons surveys that this survey belongs to.
 
bool isLoading (void) const
 Get whether the survey is still loading.
 
bool isPlanetarySurvey (void) const
 
void setNormalsSurvey (const HipsSurveyP &normals)
 
void setHorizonsSurvey (const HipsSurveyP &horizons)
 
float getGamma () const
 
void setGamma (float value)
 
float getSaturation () const
 
void setSaturation (float value)
 
float getBrightness () const
 
void setBrightness (float value)
 
float getContrast () const
 
void setContrast (float value)
 
float getOpacity () const
 
void setOpacity (float value)
 
int getColorChannel () const
 
void setColorChannel (int value)
 
bool getInvertedColors () const
 
void setInvertedColors (bool value)
 
void setDisplaySettings (float gamma, float saturation, float brightness, float contrast, float opacity, int colorChannel, bool invertedColors)
 
void resetDisplaySettings ()
 
bool hasDefaultDisplaySettings () const
 

Static Public Member Functions

static QString frameToPlanetName (const QString &frame)
 
static QList< HipsSurveyP > parseHipslist (const QString &hipslistURL, const QString &data)
 Parse a hipslist file into a list of surveys.
 

Properties

QString url
 
QJsonObject properties
 
bool isLoading
 
bool visible
 
float gamma = 1.f
 
float saturation = 1.f
 
float brightness = 1.f
 
float contrast = 1.f
 
float opacity = 1.f
 
int colorChannel = ColorChannelRgb
 
bool invertedColors = false
 
QString planet
 The name of the planet the survey is attached to, or empty if this is a skysurvey.
 

Friends

class HipsMgr
 

Constructor & Destructor Documentation

◆ HipsSurvey()

HipsSurvey::HipsSurvey ( const QString &  url,
const QString &  group,
const QString &  frame,
const QString &  type,
const QMap< QString, QString > &  hipslistProps,
double  releaseDate = 0.0 
)

Create a new HipsSurvey from its url.

Parameters
urlThe location of the survey.
groupA string that identifies a group of color/normals/horizons surveys that this survey belongs to.
frameThe reference frame from the survey's hips_frame property.
typeSurvey type from the survey's type property.
releaseDateIf known the UTC JD release date of the survey. Used for cache busting.

Member Function Documentation

◆ draw()

void HipsSurvey::draw ( StelPainter *  sPainter,
double  angle = 2.0 *M_PI,
DrawCallback  callback = Q_NULLPTR,
bool  withAtmosphericExtinction = false 
)

Render the survey.

Parameters
sPainterthe painter to use.
angletotal visible angle of the survey in radians. This is used to optimize the rendering of planet surveys. Should be set to 2 pi for sky surveys.
callbackif set this will be called for each visible tile, and the callback should do it rendering itself. If set to Q_NULLPTR, the function will draw the tiles using the default shader.