Stellarium 0.13.2
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes
ZoneArray Class Referenceabstract

Manages all ZoneData structures of a given StelGeodesicGrid level. More...

#include <ZoneArray.hpp>

Public Member Functions

unsigned int getNrOfStars () const
 Get the total number of stars in this catalog. More...
 
virtual void updateHipIndex (HipIndexStruct hipIndex[]) const
 Dummy method that does nothing. See subclass implementation. More...
 
virtual void searchAround (const StelCore *core, int index, const Vec3d &v, double cosLimFov, QList< StelObjectP > &result)=0
 Pure virtual method. See subclass implementation. More...
 
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. More...
 
bool isInitialized (void) const
 Get whether or not the catalog was successfully loaded. More...
 
void initTriangle (int index, const Vec3f &c0, const Vec3f &c1, const Vec3f &c2)
 Initialize the ZoneData struct at the given index. More...
 
virtual void scaleAxis ()=0
 

Static Public Member Functions

static ZoneArraycreate (const QString &extended_file_name, bool use_mmap)
 Named public constructor for ZoneArray. More...
 

Public Attributes

const QString fname
 File path of the catalog. More...
 
const int level
 Level in StelGeodesicGrid. More...
 
const int mag_min
 Lower bound of magnitudes in this level. Units: millimag. May be negative for brightest stars. More...
 
const int mag_range
 Range of magnitudes in this level. Units: millimags. More...
 
const int mag_steps
 Number of steps used to describe values in mag_range. Always positive. Individual stars have their mag entries from 0..mag_steps. More...
 
float star_position_scale
 

Protected Member Functions

 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. More...
 

Static Protected Member Functions

static bool readFile (QFile &file, void *data, qint64 size)
 Load a catalog and display its progress on the splash screen. More...
 

Protected Attributes

unsigned int nr_of_zones
 
unsigned int nr_of_stars
 
ZoneDatazones
 
QFile * file
 

Detailed Description

Manages all ZoneData structures of a given StelGeodesicGrid level.

An instance of this class is never created directly; the named constructor returns an instance of one of its subclasses. All it really does is bootstrap the loading process.

Definition at line 76 of file ZoneArray.hpp.

Constructor & Destructor Documentation

ZoneArray::ZoneArray ( const QString &  fname,
QFile *  file,
int  level,
int  mag_min,
int  mag_range,
int  mag_steps 
)
protected

Protected constructor. Initializes fields and does not load anything.

Member Function Documentation

static ZoneArray* ZoneArray::create ( const QString &  extended_file_name,
bool  use_mmap 
)
static

Named public constructor for ZoneArray.

Opens a catalog, reads its header info, and creates a SpecialZoneArray or HipZoneArray for loading.

Parameters
extended_file_namepath of the star catalog to load from
use_mmapwhether or not to mmap the star catalog
Returns
an instance of SpecialZoneArray or HipZoneArray
virtual void ZoneArray::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
pure virtual

Pure virtual method. See subclass implementation.

Implemented in SpecialZoneArray< Star >, SpecialZoneArray< Star2 >, SpecialZoneArray< Star3 >, and SpecialZoneArray< Star1 >.

unsigned int ZoneArray::getNrOfStars ( ) const
inline

Get the total number of stars in this catalog.

Definition at line 92 of file ZoneArray.hpp.

void ZoneArray::initTriangle ( int  index,
const Vec3f c0,
const Vec3f c1,
const Vec3f c2 
)

Initialize the ZoneData struct at the given index.

bool ZoneArray::isInitialized ( void  ) const
inline

Get whether or not the catalog was successfully loaded.

Returns
true if at least one zone was loaded, otherwise false

Definition at line 109 of file ZoneArray.hpp.

static bool ZoneArray::readFile ( QFile &  file,
void *  data,
qint64  size 
)
staticprotected

Load a catalog and display its progress on the splash screen.

Returns
true if successful, or false if an error occurred
virtual void ZoneArray::searchAround ( const StelCore core,
int  index,
const Vec3d v,
double  cosLimFov,
QList< StelObjectP > &  result 
)
pure virtual

Pure virtual method. See subclass implementation.

Implemented in SpecialZoneArray< Star >, SpecialZoneArray< Star2 >, SpecialZoneArray< Star3 >, and SpecialZoneArray< Star1 >.

virtual void ZoneArray::updateHipIndex ( HipIndexStruct  hipIndex[]) const
inlinevirtual

Dummy method that does nothing. See subclass implementation.

Reimplemented in HipZoneArray.

Definition at line 95 of file ZoneArray.hpp.

Member Data Documentation

const QString ZoneArray::fname

File path of the catalog.

Definition at line 117 of file ZoneArray.hpp.

const int ZoneArray::level

Level in StelGeodesicGrid.

Definition at line 120 of file ZoneArray.hpp.

const int ZoneArray::mag_min

Lower bound of magnitudes in this level. Units: millimag. May be negative for brightest stars.

Definition at line 123 of file ZoneArray.hpp.

const int ZoneArray::mag_range

Range of magnitudes in this level. Units: millimags.

Definition at line 126 of file ZoneArray.hpp.

const int ZoneArray::mag_steps

Number of steps used to describe values in mag_range. Always positive. Individual stars have their mag entries from 0..mag_steps.

Definition at line 129 of file ZoneArray.hpp.


The documentation for this class was generated from the following file: