Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

starbrowser.h

Go to the documentation of this file.
00001 // starbrowser.h
00002 // 
00003 // Copyright (C) 2001, Chris Laurel <claurel@shatters.net>
00004 //
00005 // Star browser tool for celestia.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 
00012 #ifndef _CELENGINE_STARBROWSER_H_
00013 #define _CELENGINE_STARBROWSER_H_
00014 
00015 #include "star.h"
00016 #include "stardb.h"
00017 #include "simulation.h"
00018 
00019 #ifndef MIN
00020 #define MIN(a,b) ((a<b)?a:b)
00021 #endif
00022 
00023 
00024 class StarBrowser
00025 {
00026  public:
00027     enum {
00028         NearestStars = 0,
00029         BrighterStars = 1,
00030         BrightestStars = 2,
00031         StarsWithPlanets = 3,
00032     };
00033 
00034     StarBrowser();
00035     StarBrowser(Simulation *_appSim, int pred = NearestStars);
00036     std::vector<const Star*>* listStars(unsigned int);
00037     void setSimulation(Simulation *_appSim);
00038     const Star *nearestStar(void);
00039     bool setPredicate(int pred);
00040     void refresh();
00041 
00042  public:
00043     // The star browser data is valid for a particular point
00044     // in space, and for performance issues is not continuously
00045     // updated.
00046     Point3f pos;
00047     UniversalCoord ucPos;
00048 
00049  private:
00050     Simulation *appSim;
00051     int predicate;
00052 };
00053 
00054 #endif // _CELENGINE_STARBROWSER_H_

Generated on Sat Jan 14 22:30:29 2006 for Celestia by  doxygen 1.4.1