23 #ifndef _ZONEARRAY_HPP_
24 #define _ZONEARRAY_HPP_
26 #include "ZoneData.hpp"
29 #include "StelCore.hpp"
30 #include "StelSkyDrawer.hpp"
31 #include "StarMgr.hpp"
46 # if (defined(__sgi) && defined(_COMPILER_VERSION))
47 # define MAP_NORESERVE MAP_AUTORESRV
50 # define MAP_NORESERVE 0
55 #define NR_OF_HIP 120416
56 #define FILE_MAGIC 0x835f040a
57 #define FILE_MAGIC_OTHER_ENDIAN 0x0a045f83
58 #define FILE_MAGIC_NATIVE 0x835f040b
59 #define MAX_MAJOR_FILE_VERSION 0
85 static ZoneArray *
create(
const QString &extended_file_name,
bool use_mmap);
99 QList<StelObjectP > &result) = 0;
104 int maxMagStarName,
float names_brightness,
105 const QVector<SphericalCap>& boundingCaps)
const = 0;
114 virtual void scaleAxis() = 0;
131 float star_position_scale;
136 static bool readFile(QFile& file,
void *data, qint64 size);
139 ZoneArray(
const QString& fname, QFile* file,
int level,
int mag_min,
int mag_range,
int mag_steps);
140 unsigned int nr_of_zones;
141 unsigned int nr_of_stars;
182 virtual void draw(
StelPainter* sPainter,
int index,
bool isInsideViewport,
184 int maxMagStarName,
float names_brightness,
185 const QVector<SphericalCap>& boundingCaps)
const;
187 virtual void scaleAxis();
189 QList<StelObjectP > &result);
212 #endif // _ZONEARRAY_HPP_
static bool readFile(QFile &file, void *data, qint64 size)
Load a catalog and display its progress on the splash screen.
const int mag_range
Range of magnitudes in this level. Units: millimags.
Container for Hipparcos information.
SpecialZoneData< Star > * getZones(void) const
Get an array of all SpecialZoneData objects in this catalog.
SpecialZoneArray(QFile *file, bool byte_swap, bool use_mmap, int level, int mag_min, int mag_range, int mag_steps)
Handles loading of the meaty part of star catalogs.
A templatized 3d vector compatible with openGL.
Manages all ZoneData structures of a given StelGeodesicGrid level.
virtual void draw(StelPainter *sPainter, int index, bool isInsideViewport, const RCMag *rcmag_table, int limitMagIndex, StelCore *core, int maxMagStarName, float names_brightness, const QVector< SphericalCap > &boundingCaps) const
Draw stars and their names onto the viewport.
const int level
Level in StelGeodesicGrid.
Main class for Stellarium core processing.
bool isInitialized(void) const
Get whether or not the catalog was successfully loaded.
static ZoneArray * create(const QString &extended_file_name, bool use_mmap)
Named public constructor for ZoneArray.
Contains the 2 parameters necessary to draw a star on screen.
Provides functions for performing openGL drawing operations.
const int mag_min
Lower bound of magnitudes in this level. Units: millimag. May be negative for brightest stars...
unsigned int getNrOfStars() const
Get the total number of stars in this catalog.
virtual void draw(StelPainter *sPainter, int index, bool is_inside, const RCMag *rcmag_table, int limitMagIndex, StelCore *core, int maxMagStarName, float names_brightness, const QVector< SphericalCap > &boundingCaps) const =0
Pure virtual method. See subclass implementation.
ZoneArray of Hipparcos stars.
ZoneArray(const QString &fname, QFile *file, int level, int mag_min, int mag_range, int mag_steps)
Protected constructor. Initializes fields and does not load anything.
void initTriangle(int index, const Vec3f &c0, const Vec3f &c1, const Vec3f &c2)
Initialize the ZoneData struct at the given index.
const int mag_steps
Number of steps used to describe values in mag_range. Always positive. Individual stars have their ma...
virtual void updateHipIndex(HipIndexStruct hipIndex[]) const
Dummy method that does nothing. See subclass implementation.
virtual void searchAround(const StelCore *core, int index, const Vec3d &v, double cosLimFov, QList< StelObjectP > &result)
Pure virtual method. See subclass implementation.
virtual void searchAround(const StelCore *core, int index, const Vec3d &v, double cosLimFov, QList< StelObjectP > &result)=0
Pure virtual method. See subclass implementation.
const QString fname
File path of the catalog.
void updateHipIndex(HipIndexStruct hipIndex[]) const
Add Hipparcos information for all stars in this catalog into hipIndex.