Stellarium  25.1
Public Member Functions | Protected Member Functions | Protected Attributes
SpecialZoneArray< Star > Class Template Reference

Implements all the virtual methods in ZoneArray. More...

#include <ZoneArray.hpp>

Public Member Functions

 SpecialZoneArray (QFile *file, bool byte_swap, bool use_mmap, int level, int mag_min)
 Handles loading of the meaty part of star catalogs. More...
 
- Public Member Functions inherited from ZoneArray
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.
 
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.
 

Protected Member Functions

SpecialZoneData< Star > * getZones (void) const
 Get an array of all SpecialZoneData objects in this catalog.
 
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 bool withAberration, const Vec3d vel, const double withParallax, const Vec3d diffPos) const override
 Draw stars and their names onto the viewport. More...
 
void searchAround (const StelCore *core, int index, const Vec3d &v, const double withParallax, const Vec3d diffPos, double cosLimFov, QList< StelObjectP > &result) override
 Pure virtual method. See subclass implementation.
 
StelObjectP searchGaiaID (int index, const StarId source_id, int &matched) const override
 
void searchGaiaIDepochPos (const StarId source_id, float dyrs, double &RA, double &DEC, double &Plx, double &pmra, double &pmdec, double &RV) const override
 
- Protected Member Functions inherited from ZoneArray
 ZoneArray (const QString &fname, QFile *file, int level, int mag_min)
 Protected constructor. Initializes fields and does not load anything.
 

Protected Attributes

Starstars
 
- Protected Attributes inherited from ZoneArray
unsigned int nr_of_zones
 
unsigned int nr_of_stars
 
ZoneDatazones
 
QFile * file
 

Additional Inherited Members

- Static Public Member Functions inherited from ZoneArray
static ZoneArraycreate (const QString &extended_file_name, bool use_mmap)
 Named public constructor for ZoneArray. More...
 
- Data Fields inherited from ZoneArray
const QString fname
 File path of the catalog.
 
const int level
 Level in StelGeodesicGrid.
 
const int mag_min
 Lower bound of magnitudes in this level at the catalog epoch. More...
 
- Static Protected Member Functions inherited from ZoneArray
static bool readFile (QFile &file, void *data, qint64 size)
 Load a catalog and display its progress on the splash screen. More...
 

Detailed Description

template<class Star>
class SpecialZoneArray< Star >

Implements all the virtual methods in ZoneArray.

Is only separate from ZoneArray because ZoneArray decides on the template parameter.

Template Parameters
Stareither Star1, Star2 or Star3, depending on the brightness of stars in this catalog.

Constructor & Destructor Documentation

◆ SpecialZoneArray()

template<class Star >
SpecialZoneArray< Star >::SpecialZoneArray ( QFile *  file,
bool  byte_swap,
bool  use_mmap,
int  level,
int  mag_min 
)

Handles loading of the meaty part of star catalogs.

Parameters
filecatalog to load from
byte_swapwhether to switch endianness of catalog data
use_mmapwhether or not to mmap the star catalog
levellevel in StelGeodesicGrid
mag_minlower bound of magnitudes

Member Function Documentation

◆ draw()

template<class Star >
void SpecialZoneArray< Star >::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 bool  withAberration,
const Vec3d  vel,
const double  withParallax,
const Vec3d  diffPos 
) const
overrideprotectedvirtual

Draw stars and their names onto the viewport.

Parameters
sPainterthe painter to use
indexzone index to draw
isInsideViewportwhether the zone is inside the current viewport. If false, we need to test more to skip stars.
rcmag_tabletable of magnitudes
limitMagIndexindex from rcmag_table at which stars are not visible anymore
corecore to use for drawing
maxMagStarNamemagnitude limit of stars that display labels
names_brightnessbrightness of labels
boundingCaps
withAberrationtrue if aberration to be applied
velvelocity vector of observer planet

Implements ZoneArray.