Kstars

milkywayitem.h
1/*
2 SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
3 SPDX-License-Identifier: GPL-2.0-or-later
4*/
5
6#pragma once
7
8#include "../skyitem.h"
9#include "../skyopacitynode.h"
10
11class LineListIndex;
12class MilkyWay;
13
14/** @class MilkyWay
15 *
16 * @short Class that handles drawing of MilkyWay (both filled and non-filled)
17 * @author Artem Fedoskin
18 * @version 1.0
19 */
20
21class MilkyWayItem : public SkyItem
22{
23 public:
24 /**
25 * @short Constructor.
26 * @param mwComp - pointer to MilkyWay that handles data
27 * @param rootNode - parent RootNode that instantiated this object
28 */
29 MilkyWayItem(MilkyWay *mwComp, RootNode *rootNode);
30
31 /**
32 * @short If m_filled is true SkyPolygonNodes(filled) will be initialized. Otherwise MilkyWay will be
33 * drawn with LineNodes(non-filled)
34 */
35 void initialize();
36
37 /**
38 * @short Update position of all nodes that represent MilkyWay
39 * If m_filled is not equal to Options::fillMilkyWay() we reinitialize all nodes by calling initialize()
40 */
41 virtual void update();
42
43 private:
44 bool m_filled { false }; //True if the polygon has to be filled
45 MilkyWay *m_MWComp { nullptr };
46};
Contains almost all the code needed for indexing and drawing and clipping lines and polygons.
Class that handles drawing of MilkyWay (both filled and non-filled)
Definition milkyway.h:25
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
This is an interface for implementing SkyItems that represent SkyComponent derived objects on the Sky...
Definition skyitem.h:30
RootNode * rootNode()
Definition skyitem.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.