Kstars

pointnode.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 "../../skyopacitynode.h"
9 
11 
12 class RootNode;
13 
14 /**
15  * @class PointNode
16  * @short SkyOpacityNode derived class that represents stars and planets using cached QSGTexture
17  *
18  * A SkyOpacityNode derived class used for representing stars and planets as stars. Upon
19  * construction loads the texture of star cached in parentNode
20  *
21  * @author Artem Fedoskin
22  * @version 1.0
23  */
24 class PointNode : public SkyOpacityNode
25 {
26  public:
27  /**
28  * @short Constructor
29  * @param p pointer to the top parent RootNode which holds texture cache
30  * @param sp spectral type
31  * @param size initial size of PointNode
32  */
33  explicit PointNode(RootNode *p, char sp = 'A', float size = 1);
34 
35  /**
36  * @short setSize update size of PointNode with the given parameter
37  * @param size new size of PointNode
38  */
39  void setSize(float size);
40 
41  QSizeF size() const;
42 
43  private:
44  char spType { 0 };
45  QSGSimpleTextureNode *texture { nullptr };
46  //parentNode holds texture cache
47  RootNode *m_rootNode { nullptr };
48  float m_size { -1 };
49  uint starColorMode { 0 };
50 };
SkyOpacityNode derived class that represents stars and planets using cached QSGTexture.
Definition: pointnode.h:24
A container for nodes that holds collection of textures for stars and provides clipping.
Definition: rootnode.h:59
void setSize(float size)
setSize update size of PointNode with the given parameter
Definition: pointnode.cpp:23
A wrapper for QSGOpacityNode that provides hide() and show() functions. If node is invisible (opacity...
PointNode(RootNode *p, char sp='A', float size=1)
Constructor.
Definition: pointnode.cpp:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Aug 13 2022 04:01:56 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.