00001 // stardata.hxx -- manage star data 00002 // 00003 // Written by Curtis Olson, started March 2000. 00004 // 00005 // Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt 00006 // 00007 // This library is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU Library General Public 00009 // License as published by the Free Software Foundation; either 00010 // version 2 of the License, or (at your option) any later version. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Library General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with this program; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00020 // 00021 // $Id: stardata_8hxx-source.html,v 1.15 2007-12-17 15:37:11 curt Exp $ 00022 00023 00024 #ifndef _SG_STARDATA_HXX 00025 #define _SG_STARDATA_HXX 00026 00027 00028 #include <plib/sg.h> 00029 00030 #include <simgear/misc/sg_path.hxx> 00031 00032 00033 #define SG_MAX_STARS 850 00034 00035 00036 class SGStarData { 00037 00038 int nstars; 00039 sgdVec3 *stars; 00040 00041 SGPath data_path; 00042 00043 public: 00044 00045 // Constructor 00046 SGStarData(); 00047 SGStarData( SGPath path ); 00048 00049 // Destructor 00050 ~SGStarData(); 00051 00052 // load the stars database 00053 bool load(); 00054 00055 // stars 00056 inline int getNumStars() const { return nstars; } 00057 inline sgdVec3 *getStars() { return stars; } 00058 }; 00059 00060 00061 #endif // _SG_STARDATA_HXX
1.5.1