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

BigStarCatalogExtension::ZoneArray Class Reference

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

#include <ZoneArray.hpp>

List of all members.

Public Member Functions

unsigned int getNrOfStars () const
 Get the total number of stars in this catalog.
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)=0
 Pure virtual method. See subclass implementation.
virtual void draw (StelPainter *sPainter, int index, bool is_inside, const float *rcmag_table, StelCore *core, unsigned int maxMagStarName, float names_brightness) const =0
 Pure virtual method. See subclass implementation.
bool isInitialized (void) const
 Get whether or not the catalog was successfully loaded.
void initTriangle (int index, const Vec3f &c0, const Vec3f &c1, const Vec3f &c2)
 Initialize the ZoneData struct at the given index.
virtual void scaleAxis (void)=0

Static Public Member Functions

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

Public Attributes

const QString fname
 File path of the catalog.
const int level
 Level in StelGeodesicGrid.
const int mag_min
 Lower bound of magnitudes in this catalog.
const int mag_range
 Range of magnitudes in this catalog.
const int mag_steps
 Number of steps used to describe values in mag_range.
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.

Static Protected Member Functions

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

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.


Constructor & Destructor Documentation

BigStarCatalogExtension::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* BigStarCatalogExtension::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_name path of the star catalog to load from
use_mmap whether or not to mmap the star catalog
Returns:
an instance of SpecialZoneArray or HipZoneArray
virtual void BigStarCatalogExtension::ZoneArray::draw ( StelPainter sPainter,
int  index,
bool  is_inside,
const float *  rcmag_table,
StelCore core,
unsigned int  maxMagStarName,
float  names_brightness 
) const [pure virtual]
unsigned int BigStarCatalogExtension::ZoneArray::getNrOfStars (  )  const [inline]

Get the total number of stars in this catalog.

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

Initialize the ZoneData struct at the given index.

bool BigStarCatalogExtension::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
static bool BigStarCatalogExtension::ZoneArray::readFile ( QFile &  file,
void *  data,
qint64  size 
) [static, protected]

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

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

Dummy method that does nothing. See subclass implementation.

Reimplemented in BigStarCatalogExtension::HipZoneArray.


Member Data Documentation

File path of the catalog.

Level in StelGeodesicGrid.

Lower bound of magnitudes in this catalog.

Range of magnitudes in this catalog.

Number of steps used to describe values in mag_range.

Generated on Sat Aug 25 22:13:34 2012 for Stellarium by  doxygen 1.6.3