Stellarium 0.11.3
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

core/modules/ZoneData.hpp

00001 /*
00002  * The big star catalogue extension to Stellarium:
00003  * Author and Copyright: Johannes Gajdosik, 2006, 2007
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA  02110-1335, USA.
00018  */
00019 
00020 #ifndef _ZONEDATA_HPP_
00021 #define _ZONEDATA_HPP_
00022 
00023 // just for Vect3d.
00024 // Take any Vector class instead, if you want to use the star feature in a
00025 // different context.
00026 #include "VecMath.hpp"
00027 #include "StelObjectType.hpp"
00028 
00029 class StelObject;
00030 
00031 namespace BigStarCatalogExtension
00032 {
00033 
00040 struct ZoneData
00041 {
00043     int getNrOfStars(void) const
00044     {
00045         return size;
00046     }
00047     Vec3f center;
00048     Vec3f axis0;
00049     Vec3f axis1;
00050     int size;
00051     void *stars;
00052 };
00053 
00058 template <class Star>
00059 struct SpecialZoneData : public ZoneData
00060 {
00061     StelObjectP createStelObject(const Star *s) const
00062     {
00063         return s->createStelObject(*this);
00064     }
00065 
00067     Star *getStars(void) const
00068     {
00069         return reinterpret_cast<Star*>(stars);
00070     }
00071 };
00072 
00073 } // namespace BigStarCatalogExtension
00074 
00075 #endif // _ZONEDATA_HPP_
Generated on Thu May 31 10:37:18 2012 for Stellarium by  doxygen 1.6.3