Kstars

supernovanode.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 "skynode.h"
9
11class PointNode;
12class PolyNode;
13class 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 */
22class 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:25
A SkyOpacityNode derived class used for drawing of polygons (both filled and non-filled)
Definition polynode.h:23
Provides virtual functions for update of coordinates and nodes hiding.
Definition skynode.h:28
A SkyNode derived class that represents supernova.
virtual void changePos(QPointF pos) override
changes the position of SkyNode on SkyMapLite.
SupernovaNode(Supernova *snova)
Constructor.
virtual void update() override
Update position and visibility of supernova.
Represents the supernova object.
Definition supernova.h:34
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:53:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.