• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

Public Member Functions | Public Attributes | List of all members
StarBlock Class Reference

#include <starblock.h>

Public Member Functions

 StarBlock (int nstars=100)
 
 ~StarBlock ()
 
StarObject * addStar (const starData &data)
 
StarObject * addStar (const deepStarData &data)
 
float getBrightMag ()
 
float getFaintMag ()
 
int getStarCount ()
 
bool isFull ()
 
void reset ()
 
int size ()
 
StarObject * star (int i)
 

Public Attributes

float brightMag
 
quint32 drawID
 
float faintMag
 
StarBlock * next
 
StarBlockList * parent
 
StarBlock * prev
 

Detailed Description

Holds a block of stars and various peripheral variables to mark its place in data structures.

Author
Akarsh Simha
Version
1.0

Definition at line 38 of file starblock.h.

Constructor & Destructor Documentation

StarBlock::StarBlock ( int  nstars = 100)
explicit

Constructor Initializes values of various parameters and creates nstars number of stars.

Parameters
nstarsNumber of stars to hold in this StarBlock

Definition at line 27 of file starblock.cpp.

StarBlock::~StarBlock ( )

Destructor Deletes all stored stars.

Definition at line 49 of file starblock.cpp.

Member Function Documentation

StarObject * StarBlock::addStar ( const starData &  data)

Initialize another star with data.

FIXME: StarObject::init doesn't reset object name(s). It shouldn't be issue since stars which are swapped in/out do not have names.

Parameters
datadata to initialize star with.
Returns
pointer to star initialized with data. NULL if block is full.

Definition at line 55 of file starblock.cpp.

StarObject * StarBlock::addStar ( const deepStarData &  data)

Definition at line 69 of file starblock.cpp.

float StarBlock::getBrightMag ( )
inline

Return the magnitude of the brightest star in this StarBlock.

Returns
Magnitude of the brightest star

Definition at line 97 of file starblock.h.

float StarBlock::getFaintMag ( )
inline

Return the magnitude of the faintest star in this StarBlock.

Returns
Magnitude of the faintest star

Definition at line 104 of file starblock.h.

int StarBlock::getStarCount ( )
inline

Return the number of stars currently filled in this StarBlock.

Returns
Number of stars filled in this StarBlock

Definition at line 110 of file starblock.h.

bool StarBlock::isFull ( )
inline

Returns true if the StarBlock is full.

Returns
true if full, false if not full

Definition at line 70 of file starblock.h.

void StarBlock::reset ( void  )

Reset this StarBlock's data, for reuse of the StarBl.

Definition at line 39 of file starblock.cpp.

int StarBlock::size ( )
inline

Return the capacity of this StarBlock.

This is different from nStars. While nStars indicates the number of stars that this StarBlock actually holds, this method returns the number of stars for which we have allocated memory. Thus, this method should return a number >= nStars.

Returns
The number of stars that this StarBlock can hold

Definition at line 81 of file starblock.h.

StarObject* StarBlock::star ( int  i)
inline

Return the i-th star in this StarBlock.

Parameters
Indexof StarBlock to return
Returns
A pointer to the i-th StarObject

Definition at line 89 of file starblock.h.

Member Data Documentation

float StarBlock::brightMag

Definition at line 118 of file starblock.h.

quint32 StarBlock::drawID

Definition at line 122 of file starblock.h.

float StarBlock::faintMag

Definition at line 117 of file starblock.h.

StarBlock* StarBlock::next

Definition at line 121 of file starblock.h.

StarBlockList* StarBlock::parent

Definition at line 119 of file starblock.h.

StarBlock* StarBlock::prev

Definition at line 120 of file starblock.h.


The documentation for this class was generated from the following files:
  • starblock.h
  • starblock.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal