Kstars

linelist.h
1 /*
2  SPDX-FileCopyrightText: 2007 James B. Bowlin <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "typedef.h"
10 
11 #include <QList>
12 
13 class SkyPoint;
14 class KSNumbers;
15 
16 /**
17  * @class LineList
18  * A simple data container used by LineListIndex. It contains a list of
19  * SkyPoints and integer drawID, updateID and updateNumID.
20  *
21  * @author James B. Bowlin
22  * @version 0.2
23 */
24 class LineList
25 {
26  public:
27  LineList() : drawID(0), updateID(0), updateNumID(0) {}
28  virtual ~LineList() = default;
29 
30  /**
31  * @short return the list of points for iterating or appending (or whatever).
32  */
33  SkyList *points() { return &pointList; }
34  std::shared_ptr<SkyPoint> at(int i) { return pointList.at(i); }
35  void append(std::shared_ptr<SkyPoint> p) { pointList.append(p); }
36 
37  /**
38  * A global drawID (in SkyMesh) is updated at the start of each draw
39  * cycle. Since an extended object is often covered by more than one
40  * trixel, the drawID is used to make sure each object gets drawn at
41  * most once per draw cycle. It is public because it is both set and
42  * read by the LineListIndex class.
43  */
44  DrawID drawID;
45  UpdateID updateID;
46  UpdateID updateNumID;
47 
48  private:
49  SkyList pointList;
50 };
Stores dms coordinates for a point in the sky. for converting between coordinate systems.
Definition: skypoint.h:44
void append(const T &value)
DrawID drawID
A global drawID (in SkyMesh) is updated at the start of each draw cycle.
Definition: linelist.h:44
Store several time-dependent astronomical quantities.
Definition: ksnumbers.h:42
const T & at(int i) const const
SkyList * points()
return the list of points for iterating or appending (or whatever).
Definition: linelist.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:01 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.