Kstars

constellationboundarylines.h
1/*
2 SPDX-FileCopyrightText: 2005 Jason Harris <kstars@30doradus.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "noprecessindex.h"
10
11#include <QHash>
12#include <QPolygonF>
13
14class PolyList;
16class KSFileReader;
17
20
21/**
22 * @class ConstellationBoundary
23 * Collection of lines comprising the borders between constellations
24 *
25 * @author Jason Harris
26 * @version 0.1
27 */
28class ConstellationBoundaryLines : public LineListIndex
29{
30 public:
31 /**
32 * @short Constructor
33 * Simply adds all of the coordinate grid circles (meridians and parallels)
34 * @p parent Pointer to the parent SkyComposite object
35 *
36 * Reads the constellation boundary data from cbounds.dat. The boundary data is defined by
37 * a series of RA,Dec coordinate pairs defining the "nodes" of the boundaries. The nodes are
38 * organized into "segments", such that each segment represents a continuous series
39 * of boundary-line intervals that divide two particular constellations.
40 */
41 explicit ConstellationBoundaryLines(SkyComposite *parent);
42 virtual ~ConstellationBoundaryLines() override = default;
43
44 QString constellationName(const SkyPoint *p) const;
45
46 bool selected() override;
47
48 void preDraw(SkyPainter *skyp) override;
49
50 private:
51 void appendPoly(const std::shared_ptr<PolyList> &polyList, int debug = 0);
52
53 /**
54 * @short reads the indices from the KSFileReader instead of using
55 * the SkyMesh to create them. If the file pointer is null or if
56 * debug == -1 then we fall back to using the index.
57 */
58 void appendPoly(std::shared_ptr<PolyList> &polyList, KSFileReader *file, int debug);
59
60 PolyList *ContainingPoly(const SkyPoint *p) const;
61
62 SkyMesh *m_skyMesh { nullptr };
63 PolyIndex m_polyIndex;
64 int m_polyIndexCnt { 0 };
65};
Collection of lines comprising the borders between constellations.
I totally rewrote this because the earlier scheme of reading all the lines of a file into a buffer be...
Contains almost all the code needed for indexing and drawing and clipping lines and polygons.
SkyComposite * parent()
SkyComposite is a kind of container class for SkyComponent objects.
Provides an interface to the Hierarchical Triangular Mesh (HTM) library written by A.
Definition skymesh.h:74
Draws things on the sky, without regard to backend.
Definition skypainter.h:40
The sky coordinates of a point in the sky.
Definition skypoint.h:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.