Kstars

skyline.h
1/*
2 SPDX-FileCopyrightText: 2006 Jason Harris <kstarss@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "skypoint.h"
10
11class dms;
12class KStarsData;
13
14/**
15 * @class SkyLine
16 *
17 * A series of connected line segments in the sky, composed of SkyPoints at
18 * its vertices. SkyLines are used for constellation lines and boundaries,
19 * the coordinate grid, and the equator, ecliptic and horizon.
20 *
21 * @note the SkyLine segments are always straight lines, they are not
22 * Great Circle segments joining the two endpoints. Therefore, line segments
23 * that need to follow great circles must be approximated with many short
24 * SkyLine segments.
25 */
27{
28 public:
29 SkyLine() = default;
30
31 ~SkyLine();
32
33 /**
34 * Append a segment to the list by adding a new endpoint.
35 *
36 * @param p the new endpoint to be added
37 */
38 void append(SkyPoint *p);
39
40 /**
41 * @return a const pointer to a point in the SkyLine
42 * param i the index position of the point
43 */
44 inline SkyPoint *point(int i) const { return m_pList[i]; }
45
46 inline QList<SkyPoint *> &points() { return m_pList; }
47
48 /** Remove all points from list */
49 void clear();
50
51 /**
52 * Set point i in the SkyLine
53 *
54 * @param i the index position of the point to modify
55 * @param p the new SkyPoint
56 */
57 void setPoint(int i, SkyPoint *p);
58
59 /**
60 * @return the angle subtended by any line segment along the SkyLine.
61 * @param i the index of the line segment to be measured.
62 * If no argument is given, the first segment is assumed.
63 */
64 dms angularSize(int i = 0) const;
65
66 void update(KStarsData *data, KSNumbers *num = nullptr);
67
68 private:
69 QList<SkyPoint *> m_pList;
70};
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition ksnumbers.h:43
KStarsData is the backbone of KStars.
Definition kstarsdata.h:74
A series of connected line segments in the sky, composed of SkyPoints at its vertices.
Definition skyline.h:27
void setPoint(int i, SkyPoint *p)
Set point i in the SkyLine.
Definition skyline.cpp:30
void clear()
Remove all points from list.
Definition skyline.cpp:19
SkyPoint * point(int i) const
Definition skyline.h:44
void append(SkyPoint *p)
Append a segment to the list by adding a new endpoint.
Definition skyline.cpp:25
dms angularSize(int i=0) const
Definition skyline.cpp:40
The sky coordinates of a point in the sky.
Definition skypoint.h:45
An angle, stored as degrees, but expressible in many ways.
Definition dms.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:11:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.