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.3 2010/02/23 22:10:16 curt Exp $ 00022 00023 00024 #ifndef _SG_STARDATA_HXX 00025 #define _SG_STARDATA_HXX 00026 00027 #include <vector> 00028 #include <simgear/math/SGMath.hxx> 00029 00030 class SGPath; 00031 00032 class SGStarData { 00033 public: 00034 // Constructor 00035 SGStarData( const SGPath& path ); 00036 00037 // Destructor 00038 ~SGStarData(); 00039 00040 // load the stars database 00041 bool load( const SGPath& path ); 00042 00043 // stars 00044 inline int getNumStars() const { return _stars.size(); } 00045 inline SGVec3d *getStars() { return &(_stars[0]); } 00046 00047 private: 00048 std::vector<SGVec3d> _stars; 00049 }; 00050 00051 00052 #endif // _SG_STARDATA_HXX