File indexing completed on 2024-05-05 03:44:48
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 #include "../skyopacitynode.h" 0010 0011 class LineListIndex; 0012 class MilkyWay; 0013 0014 /** @class MilkyWay 0015 * 0016 * @short Class that handles drawing of MilkyWay (both filled and non-filled) 0017 * @author Artem Fedoskin 0018 * @version 1.0 0019 */ 0020 0021 class MilkyWayItem : public SkyItem 0022 { 0023 public: 0024 /** 0025 * @short Constructor. 0026 * @param mwComp - pointer to MilkyWay that handles data 0027 * @param rootNode - parent RootNode that instantiated this object 0028 */ 0029 MilkyWayItem(MilkyWay *mwComp, RootNode *rootNode); 0030 0031 /** 0032 * @short If m_filled is true SkyPolygonNodes(filled) will be initialized. Otherwise MilkyWay will be 0033 * drawn with LineNodes(non-filled) 0034 */ 0035 void initialize(); 0036 0037 /** 0038 * @short Update position of all nodes that represent MilkyWay 0039 * If m_filled is not equal to Options::fillMilkyWay() we reinitialize all nodes by calling initialize() 0040 */ 0041 virtual void update(); 0042 0043 private: 0044 bool m_filled { false }; //True if the polygon has to be filled 0045 MilkyWay *m_MWComp { nullptr }; 0046 };