Kstars

milkywayitem.h
1 /*
2  SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
3  SPDX-License-Identifier: GPL-2.0-or-later
4 */
5 
6 #pragma once
7 
8 #include "../skyitem.h"
9 #include "../skyopacitynode.h"
10 
11 class LineListIndex;
12 class 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 
21 class 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 };
A base class that is used for displaying SkyComponents on SkyMapLite.
Definition: skyitem.h:29
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
virtual void update()=0
updates the coordinates and visibility of child node.
Class that handles drawing of MilkyWay (both filled and non-filled)
Definition: milkyway.h:24
void initialize(StandardShortcut id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.