Kstars

milkyway.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 "linelistindex.h"
10
11/**
12 * @class MlkyWay
13 *
14 * Draw filled areas as Milky Way and Magellanic clouds.
15 *
16 * This class should store SkipLists instead of LineLists. The two methods
17 * are used inside of LineListIndex to access the SkipLists' skip hashes.
18 * This way the same code in LineListIndex does double duty. Only subclassed
19 * by MilkyWay.
20 *
21 * @author James B. Bowlin
22 * @version 0.1
23 */
24class MilkyWay : public LineListIndex
25{
26 friend class MilkyWayItem;
27
28 public:
29 /**
30 * @short Constructor
31 * @p parent pointer to the parent SkyComposite
32 */
33 explicit MilkyWay(SkyComposite *parent);
34
35 /** Load skiplists from file */
37
38 void draw(SkyPainter *skyp) override;
39 bool selected() override;
40
41 protected:
42 /**
43 * @short Returns an IndexHash from the SkyMesh that contains the set
44 * of trixels that cover the _SkipList_ lineList excluding skipped
45 * lines as specified in the SkipList. SkipList is a subclass of
46 * LineList.
47 * FIXME: Implementation is broken!!
48 */
49 const IndexHash &getIndexHash(LineList *skipList) override;
50
51 /**
52 * @short Returns a boolean indicating whether to skip the i-th line
53 * segment in the _SkipList_ skipList. Note that SkipList is a
54 * subclass of LineList. This routine allows us to use the drawing
55 * code in LineListIndex instead of repeating it all here.
56 * FIXME: Implementation is broken!!
57 */
58 SkipHashList *skipList(LineList *lineList) override;
59};
Contains almost all the code needed for indexing and drawing and clipping lines and polygons.
A simple data container used by LineListIndex.
Definition linelist.h:25
Class that handles drawing of MilkyWay (both filled and non-filled)
Definition milkyway.h:25
void loadContours(QString fname, QString greeting)
Load skiplists from file.
Definition milkyway.cpp:76
SkipHashList * skipList(LineList *lineList) override
Returns a boolean indicating whether to skip the i-th line segment in the SkipList skipList.
Definition milkyway.cpp:43
bool selected() override
Definition milkyway.cpp:48
const IndexHash & getIndexHash(LineList *skipList) override
Returns an IndexHash from the SkyMesh that contains the set of trixels that cover the SkipList lineLi...
Definition milkyway.cpp:37
void draw(SkyPainter *skyp) override
The top level draw routine.
Definition milkyway.cpp:57
MilkyWay(SkyComposite *parent)
Constructor parent pointer to the parent SkyComposite.
Definition milkyway.cpp:22
SkyComposite * parent()
SkyComposite is a kind of container class for SkyComponent objects.
Draws things on the sky, without regard to backend.
Definition skypainter.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:04 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.