Kstars

pointnode.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 "../../skyopacitynode.h"
9
11
12class 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 */
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:25
void setSize(float size)
setSize update size of PointNode with the given parameter
Definition pointnode.cpp:23
PointNode(RootNode *p, char sp='A', float size=1)
Constructor.
Definition pointnode.cpp:15
A QSGClipNode derived class used as a container for holding pointers to nodes and for clipping.
Definition rootnode.h:60
A wrapper for QSGOpacityNode that provides hide() and show() functions.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:47 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.