Kstars

supernovanode.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 "skynode.h"
9 
11 class PointNode;
12 class PolyNode;
13 class Supernova;
14 
15 /**
16  * @class SupernovaNode
17  *
18  * @short A SkyNode derived class that represents supernova
19  * @author Artem Fedoskin
20  * @version 1.0
21  */
22 class SupernovaNode : public SkyNode
23 {
24  public:
25  /**
26  * @short Constructor.
27  * @param snova - pointer to supernova that needs to be represented by this node
28  */
29  explicit SupernovaNode(Supernova *snova);
30 
31  /**
32  * @short Update position and visibility of supernova. Initialize m_lines if not already done
33  */
34  virtual void update() override;
35 
36  virtual void changePos(QPointF pos) override;
37 
38  inline Supernova *snova() { return m_snova; }
39 
40  private:
41  Supernova *m_snova { nullptr };
42 
43  QSGGeometryNode *m_lines { nullptr };
44 
45  QSGFlatColorMaterial *m_material { nullptr };
46  QSGGeometry *m_geometry { nullptr };
47 };
SkyOpacityNode derived class that represents stars and planets using cached QSGTexture.
Definition: pointnode.h:24
SupernovaNode(Supernova *snova)
Constructor.
virtual void changePos(QPointF pos) override
changes the position of SkyNode on SkyMapLite.
A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
Definition: polynode.h:22
Provides virtual functions for update of coordinates and nodes hiding.
Definition: skynode.h:27
virtual void update() override
Update position and visibility of supernova.
A SkyNode derived class that represents supernova.
Definition: supernovanode.h:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 03:55:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.