• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • skycomponents
highpmstarlist.h
Go to the documentation of this file.
1 /***************************************************************************
2  highpmstarlist.h - K Desktop Planetarium
3  -------------------
4  begin : 2007-08-06
5  copyright : (C) 2007 by James B. Bowlin
6  email : bowlin@mindspring.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef HIGHPMSTARLIST_H
19 #define HIGHPMSTARLIST_H
20 
21 #include "ksnumbers.h"
22 #include "typedef.h"
23 
24 class SkyMesh;
25 struct HighPMStar;
26 
27 /* @class HighPMStarList
28  * Holds a list of stars with high proper motion along with the trixel each star
29  * is currently located in. The purpose of this class is to save some time by
30  * only re-indexing the stars with high proper motion instead of the entire
31  * collection of stars (which takes about 4 seconds on a AMD64 3600).
32  *
33  * Multiple HighPMStarList's can be used so we re-index a smaller number of
34  * stars more frequently and a larger number of stars less frequently.
35  *
36  *
37  * @author James B. Bowlin @version 0.1
38 */
39 
40 class HighPMStarList
41 {
42 public:
43  /* @short Constructor
44  */
45  explicit HighPMStarList( double threshold );
46 
47  ~HighPMStarList();
48 
49  /* @short adds the star located at trixel to the list if the pm is
50  * greater than the threshold. We also use the pm to determine the
51  * update interval. Returns true if the star was appended and false
52  * otherwise.
53  */
54  bool append( Trixel trixel, StarObject* star, double pm );
55 
56  /* @short returns the threshold.
57  */
58  double threshold() { return m_threshold; }
59 
60  /* @short returns the number of stars in the list.
61  */
62  int size() { return m_stars.size(); }
63 
64  /* @short sets the time this list was last indexed to. Normally this
65  * is done automatically in the reindex() routine but this is useful
66  * if the entire starIndex gets re-indexed.
67  */
68  void setIndexTime( KSNumbers *num );
69 
70  /* @short if the date in num differs from the last time we indexed by
71  * more than our update interval then we re-index all the stars in our
72  * list that have actually changed trixels.
73  */
74  void reindex( KSNumbers *num, StarIndex* starIndex );
75 
76  /* @short prints out some brief statistics.
77  */
78  void stats();
79 
80 private:
81  QVector<HighPMStar*> m_stars;
82 
83  KSNumbers m_reindexNum;
84  double m_reindexInterval;
85  double m_threshold;
86  double m_maxPM;
87 
88  SkyMesh* m_skyMesh;
89 };
90 
91 #endif
HighPMStarList::append
bool append(Trixel trixel, StarObject *star, double pm)
Definition: highpmstarlist.cpp:46
typedef.h
HighPMStarList::reindex
void reindex(KSNumbers *num, StarIndex *starIndex)
Definition: highpmstarlist.cpp:67
HighPMStarList::setIndexTime
void setIndexTime(KSNumbers *num)
Definition: highpmstarlist.cpp:62
HighPMStar
struct HighPMStar HighPMStar
HighPMStarList::threshold
double threshold()
Definition: highpmstarlist.h:58
ksnumbers.h
HighPMStarList
Definition: highpmstarlist.h:40
Trixel
unsigned int Trixel
Definition: htmesh/typedef.h:4
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
StarIndex
QVector< StarList * > StarIndex
Definition: skycomponents/typedef.h:49
HighPMStarList::stats
void stats()
Definition: highpmstarlist.cpp:117
SkyMesh
Definition: skymesh.h:93
HighPMStarList::~HighPMStarList
~HighPMStarList()
Definition: highpmstarlist.cpp:39
StarObject
This is a subclass of SkyObject.
Definition: starobject.h:41
HighPMStarList::HighPMStarList
HighPMStarList(double threshold)
Definition: highpmstarlist.cpp:33
HighPMStarList::size
int size()
Definition: highpmstarlist.h:62
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal