File indexing completed on 2024-04-14 14:11:04

0001 /*
0002     SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #pragma once
0007 
0008 #include "skyitem.h"
0009 
0010 class SkyMesh;
0011 class SkyOpacityNode;
0012 class StarBlockFactory;
0013 class StarComponent;
0014 
0015 /**
0016  * @class StarItem
0017  *
0018  * @short Class that handles Stars
0019  * @author Artem Fedoskin
0020  * @version 1.0
0021  */
0022 class StarItem : public SkyItem
0023 {
0024   public:
0025     /**
0026      * @short Constructor.
0027      * @param starComp star component
0028      * @param rootNode parent RootNode that instantiated this object
0029      */
0030     StarItem(StarComponent *starComp, RootNode *rootNode);
0031 
0032     /**
0033      * @short Update positions of nodes that represent stars
0034      * In this function we perform almost the same thing as in DeepSkyItem::updateDeepSkyNode() to reduce
0035      * memory consumption.
0036      * @see DeepSkyItem::updateDeepSkyNode()
0037      */
0038     virtual void update();
0039 
0040   private:
0041     StarComponent *m_starComp { nullptr };
0042     SkyMesh *m_skyMesh { nullptr };
0043     StarBlockFactory *m_StarBlockFactory { nullptr };
0044 
0045     SkyOpacityNode *m_stars { nullptr };
0046     SkyOpacityNode *m_deepStars { nullptr };
0047     SkyOpacityNode *m_starLabels { nullptr };
0048 };