org.stellarium.astro
Class HipStarMgr

java.lang.Object
  extended by org.stellarium.astro.HipStarMgr

public class HipStarMgr
extends java.lang.Object

Manage groups of Stars


Field Summary
(package private) static java.lang.String[] catalogs
           
private  java.util.Set<HipStar> commonNamesMap
           
(package private)  boolean flagPointStar
           
(package private)  boolean flagStarName
           
(package private)  boolean flagStarSciName
           
(package private)  boolean flagStarTwinkle
           
(package private)  boolean gravityLabel
           
private  Grid hipGrid
          Grid for opimisation
(package private)  float limitingMag
           
(package private)  float maxMagStarName
           
(package private)  float maxMagStarSciName
           
(package private)  LinearFader namesFader
           
static double RADIUS_STAR
           
private  java.util.Set<HipStar> sciNamesMap
           
private  java.util.Map<java.lang.Integer,HipStar> starFlatArray
          The map of Hipparcos Stars per hp number The simple array of the star for sequential research
(package private)  float starMagScale
           
(package private)  float starScale
           
(package private)  LinearFader starsFader
           
private  STexture starTexture
           
private  java.util.List<java.util.List<HipStar>> starZones
          array of star vector with the grid id as array rank
(package private)  float twinkleAmount
           
 
Constructor Summary
HipStarMgr()
          construct and load all data
 
Method Summary
 void draw(javax.vecmath.Tuple3d equVision, ToneReproductor someEye, Projector prj)
          Draw all the stars
 void drawPoint(javax.vecmath.Tuple3d equVision, ToneReproductor someEye, Projector prj)
          Draw all the stars
private  boolean fillNames(java.lang.String nameFile, HipStar.NamesManager namesMgr, java.util.Set<HipStar> starWithNames)
           
 java.awt.Color getCircleColor()
           
 boolean getFlagPointStar()
          Get flag for displaying Star as GLpoints (faster but not so nice)
 boolean getFlagStarName()
          Get display flag for Star names
 boolean getFlagStars()
          Get display flag for Stars
 boolean getFlagStarSciName()
          Get display flag for Star Scientific names
 boolean getFlagStarTwinkle()
          Get flag for Star twinkling
 java.awt.Color getLabelColor()
           
 float getMaxMagStarName()
          Get maximum magnitude at which stars names are displayed
 float getMaxMagStarSciName()
          Get maximum magnitude at which stars scientific names are displayed
 float getStarLimitingMag()
          Get stars limiting display magnitude
 float getStarMagScale()
          Get base stars display scaling factor wrt magnitude
 float getStarScale()
          Get base stars display scaling factor
 float getStarTwinkleAmount()
          Get stars twinkle amount
 void init(float fontSize, java.lang.String fontName, java.lang.String hipCatFile, java.lang.String commonNameFile, java.lang.String sciNameFile, LoadingBar lb)
           
 java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix, int maxNbItem)
           
 boolean loadCommonNames(java.lang.String commonNameFile)
          Load common names from file
(package private)  void loadData(java.io.File hipCatFile, LoadingBar lb)
          Load from file ( create the stream and call the Read function )
(package private)  boolean loadDouble(java.io.File hipCatFile)
           
 boolean loadSciNames(java.lang.String sciNameFile)
          Load scientific names from file.
private  void loadStarFlag(java.io.File flagFile, HipStar.FlagManager flagManager)
           
(package private)  boolean loadVariable(java.io.File hipCatFile)
           
 StelObject search(java.lang.String name)
           
 HipStar search(javax.vecmath.Vector3d pos)
          Look for a star by XYZ coords
 java.util.List<StelObject> searchAround(javax.vecmath.Tuple3d p, double limFov)
          Return a stl vector containing the nebulas located inside the limFov circle around position v
 StelObject searchByNameI18n(java.lang.String nameI18n)
           
 HipStar searchHP(int hpNumber)
          Search the star by HP number.
 void setCircleColor(java.awt.Color circleColor)
           
 void setFlagPointStar(boolean b)
          Set flag for displaying Star as GLpoints (faster but not so nice)
 void setFlagSciNames(boolean f)
           
 void setFlagStarName(boolean b)
          Set display flag for Star names
 void setFlagStars(boolean b)
          Set display flag for Stars
 void setFlagStarSciName(boolean b)
          Set display flag for Star Scientific names
 void setFlagStarTwinkle(boolean b)
          Set flag for Star twinkling
 void setFont(int fontSize, java.lang.String fontName)
           
 void setLabelColor(java.awt.Color labelColor)
           
 void setMaxMagStarName(float b)
          Set maximum magnitude at which stars names are displayed
 void setMaxMagStarSciName(float b)
          Set maximum magnitude at which stars scientific names are displayed
(package private)  void setNamesFadeDuration(float duration)
           
 void setStarLimitingMag(float f)
          Set stars limiting display magnitude
 void setStarMagScale(float b)
          Set stars display scaling factor wrt magnitude
 void setStarScale(float b)
          Set base stars display scaling factor
 void setStarTwinkleAmount(float b)
          Set stars twinkle amount
 void translateNames(Translator trans)
           
 void update(long deltaTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RADIUS_STAR

public static final double RADIUS_STAR
See Also:
Constant Field Values

catalogs

static final java.lang.String[] catalogs

namesFader

LinearFader namesFader

starsFader

LinearFader starsFader

starScale

float starScale

starMagScale

float starMagScale

flagStarName

boolean flagStarName

flagStarSciName

boolean flagStarSciName

maxMagStarName

float maxMagStarName

maxMagStarSciName

float maxMagStarSciName

flagStarTwinkle

boolean flagStarTwinkle

twinkleAmount

float twinkleAmount

flagPointStar

boolean flagPointStar

gravityLabel

boolean gravityLabel

limitingMag

float limitingMag

starZones

private java.util.List<java.util.List<HipStar>> starZones
array of star vector with the grid id as array rank


hipGrid

private Grid hipGrid
Grid for opimisation


starFlatArray

private java.util.Map<java.lang.Integer,HipStar> starFlatArray
The map of Hipparcos Stars per hp number The simple array of the star for sequential research


starTexture

private STexture starTexture

commonNamesMap

private java.util.Set<HipStar> commonNamesMap

sciNamesMap

private java.util.Set<HipStar> sciNamesMap
Constructor Detail

HipStarMgr

public HipStarMgr()
           throws StellariumException
construct and load all data

Throws:
StellariumException
Method Detail

getCircleColor

public java.awt.Color getCircleColor()

setCircleColor

public void setCircleColor(java.awt.Color circleColor)

getLabelColor

public java.awt.Color getLabelColor()

setLabelColor

public void setLabelColor(java.awt.Color labelColor)

init

public void init(float fontSize,
                 java.lang.String fontName,
                 java.lang.String hipCatFile,
                 java.lang.String commonNameFile,
                 java.lang.String sciNameFile,
                 LoadingBar lb)
          throws StellariumException
Throws:
StellariumException

loadData

void loadData(java.io.File hipCatFile,
              LoadingBar lb)
        throws StellariumException
Load from file ( create the stream and call the Read function )

Parameters:
hipCatFile - Hipparcos catalog file
lb -
Throws:
StellariumException - If the Hipparcos catalog file is not found or if a problem occured while reading it.

loadCommonNames

public boolean loadCommonNames(java.lang.String commonNameFile)
                        throws StellariumException
Load common names from file

Parameters:
commonNameFile - The common names file
Throws:
StellariumException

loadSciNames

public boolean loadSciNames(java.lang.String sciNameFile)
                     throws StellariumException
Load scientific names from file.

Parameters:
sciNameFile -
Throws:
StellariumException

fillNames

private boolean fillNames(java.lang.String nameFile,
                          HipStar.NamesManager namesMgr,
                          java.util.Set<HipStar> starWithNames)
                   throws StellariumException
Throws:
StellariumException

draw

public void draw(javax.vecmath.Tuple3d equVision,
                 ToneReproductor someEye,
                 Projector prj)
Draw all the stars


drawPoint

public void drawPoint(javax.vecmath.Tuple3d equVision,
                      ToneReproductor someEye,
                      Projector prj)
Draw all the stars


search

public HipStar search(javax.vecmath.Vector3d pos)
Look for a star by XYZ coords

Parameters:
pos -

searchAround

public java.util.List<StelObject> searchAround(javax.vecmath.Tuple3d p,
                                               double limFov)
Return a stl vector containing the nebulas located inside the limFov circle around position v


loadDouble

boolean loadDouble(java.io.File hipCatFile)
             throws StellariumException
Throws:
StellariumException

loadVariable

boolean loadVariable(java.io.File hipCatFile)
               throws StellariumException
Throws:
StellariumException

loadStarFlag

private void loadStarFlag(java.io.File flagFile,
                          HipStar.FlagManager flagManager)
                   throws StellariumException
Throws:
StellariumException

translateNames

public void translateNames(Translator trans)

search

public StelObject search(java.lang.String name)
                  throws StellariumException
Throws:
StellariumException

searchHP

public HipStar searchHP(int hpNumber)
Search the star by HP number.

Parameters:
hpNumber - The HP number
Returns:
The Hip star

searchByNameI18n

public StelObject searchByNameI18n(java.lang.String nameI18n)

listMatchingObjectsI18n

public java.util.List<java.lang.String> listMatchingObjectsI18n(java.lang.String objPrefix,
                                                                int maxNbItem)

setFont

public void setFont(int fontSize,
                    java.lang.String fontName)
             throws StellariumException
Throws:
StellariumException

setFlagSciNames

public void setFlagSciNames(boolean f)

update

public void update(long deltaTime)

setNamesFadeDuration

void setNamesFadeDuration(float duration)

setFlagStars

public void setFlagStars(boolean b)
Set display flag for Stars


getFlagStars

public boolean getFlagStars()
Get display flag for Stars


setFlagStarName

public void setFlagStarName(boolean b)
Set display flag for Star names


getFlagStarName

public boolean getFlagStarName()
Get display flag for Star names


setFlagStarSciName

public void setFlagStarSciName(boolean b)
Set display flag for Star Scientific names


getFlagStarSciName

public boolean getFlagStarSciName()
Get display flag for Star Scientific names


setFlagStarTwinkle

public void setFlagStarTwinkle(boolean b)
Set flag for Star twinkling


getFlagStarTwinkle

public boolean getFlagStarTwinkle()
Get flag for Star twinkling


setFlagPointStar

public void setFlagPointStar(boolean b)
Set flag for displaying Star as GLpoints (faster but not so nice)


getFlagPointStar

public boolean getFlagPointStar()
Get flag for displaying Star as GLpoints (faster but not so nice)


setMaxMagStarName

public void setMaxMagStarName(float b)
Set maximum magnitude at which stars names are displayed


getMaxMagStarName

public float getMaxMagStarName()
Get maximum magnitude at which stars names are displayed


setMaxMagStarSciName

public void setMaxMagStarSciName(float b)
Set maximum magnitude at which stars scientific names are displayed


getMaxMagStarSciName

public float getMaxMagStarSciName()
Get maximum magnitude at which stars scientific names are displayed


setStarScale

public void setStarScale(float b)
Set base stars display scaling factor


getStarScale

public float getStarScale()
Get base stars display scaling factor


setStarMagScale

public void setStarMagScale(float b)
Set stars display scaling factor wrt magnitude


getStarMagScale

public float getStarMagScale()
Get base stars display scaling factor wrt magnitude


setStarTwinkleAmount

public void setStarTwinkleAmount(float b)
Set stars twinkle amount


getStarTwinkleAmount

public float getStarTwinkleAmount()
Get stars twinkle amount


setStarLimitingMag

public void setStarLimitingMag(float f)
Set stars limiting display magnitude


getStarLimitingMag

public float getStarLimitingMag()
Get stars limiting display magnitude