org.stellarium.astro
Class Constellation

java.lang.Object
  extended by org.stellarium.StelObject
      extended by org.stellarium.StelObjectBase
          extended by org.stellarium.astro.Constellation

public class Constellation
extends StelObjectBase

Constellation.

See C++ version of this file.

Version:
Java
Author:
Jerome Beau

Nested Class Summary
 
Nested classes/interfaces inherited from class org.stellarium.StelObject
StelObject.TYPE
 
Field Summary
(package private)  java.lang.String abbreviation
          Abbreviation (of the latin name for western constellations)
(package private)  LinearFader artFader
          Define whether art, lines, names and boundary must be drawn
protected  STexture artTexture
           
(package private)  javax.vecmath.Point3d[] artVertex
           
private  java.util.List<StelObject> asterism
           
(package private) static SColor boundaryColor
           
(package private)  LinearFader boundaryFader
           
(package private)  java.lang.String englishName
          Name in english
(package private) static boolean gravityLabel
          Whether labels are to be printed with gravity
(package private)  java.util.List<java.util.List<javax.vecmath.Point3d>> isolatedBoundarySegments
           
(package private) static SColor labelColor
           
(package private) static SColor lineColor
           
(package private)  LinearFader lineFader
           
(package private)  LinearFader nameFader
           
(package private)  java.lang.String nameI18
          International name (translated using gettext)
private  int nbSegments
          Number of segments in the lines
(package private) static double RADIUS_CONST
           
(package private)  java.util.List<java.util.List<javax.vecmath.Point3d>> sharedBoundarySegments
           
(package private) static boolean singleSelected
           
protected  javax.vecmath.Point3d XYName
           
protected  javax.vecmath.Point3d XYZname
          Direction vector pointing on constellation name drawing position
 
Fields inherited from class org.stellarium.StelObjectBase
DEFAULT_COLOR
 
Constructor Summary
Constellation()
           
 
Method Summary
(package private)  void drawArt(DefaultProjector prj, Navigator nav)
          Draw the art texture
(package private)  void drawArtOptim(Projector prj, NavigatorIfc nav)
          Draw the art texture, optimized function to be called thru a constellation manager only
(package private)  void drawBoundaryOptim(Projector prj)
           
(package private)  void drawName(SFontIfc constfont, Projector prj)
          Draw the name
(package private)  void drawOptim(Projector prj)
          Draw the lines for the Constellation using the coords of the stars (optimized for use thru the class ConstellationMgr only)
 StelObject getBrightestStarInConstellation()
           
 javax.vecmath.Point3d getEarthEquPos(NavigatorIfc nav)
          Get position in earth equatorial frame
 java.lang.String getEnglishName()
          Return object's name
(package private)  boolean getFlagArt()
           
(package private)  boolean getFlagBoundaries()
           
(package private)  boolean getFlagLines()
           
(package private)  boolean getFlagName()
           
 java.lang.String getInfoString(NavigatorIfc nav)
          Write I18n information about the object in String.
 float getMag(NavigatorIfc nav)
          Return object's magnitude
 java.lang.String getNameI18n()
           
 javax.vecmath.Point3d getObsJ2000Pos(NavigatorIfc nav)
          observer centered J2000 coordinates
 java.lang.String getShortInfoString(NavigatorIfc nav)
          The returned String can typically be used for object labeling in the sky
 java.lang.String getShortName()
           
 StelObject.TYPE getType()
          Return object's type
private  boolean isInScreen(Projector prj, int i, javax.vecmath.Point3d win, javax.vecmath.Tuple3d equVision)
           
(package private)  Constellation isStarIn(StelObject s)
           
(package private)  boolean read(java.lang.String record, HipStarMgr vouteCeleste)
          Read Constellation datas and grab cartesian positions of stars
 void setAllFlags(Constellation cc)
           
(package private)  void setFlagArt(boolean b)
           
(package private)  void setFlagBoundaries(boolean b)
           
(package private)  void setFlagLines(boolean b)
           
(package private)  void setFlagName(boolean b)
           
(package private)  void update(int deltaTime)
           
 
Methods inherited from class org.stellarium.StelObjectBase
deleteTextures, drawPointer, getCloseFOV, getMag, getOnScreenSize, getParentSatellitesFOV, getRGB, getSatellitesFOV, initTextures, release, retain, update
 
Methods inherited from class org.stellarium.StelObject
getUninitializedObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RADIUS_CONST

static final double RADIUS_CONST
See Also:
Constant Field Values

nameI18

java.lang.String nameI18
International name (translated using gettext)


englishName

java.lang.String englishName
Name in english


abbreviation

java.lang.String abbreviation
Abbreviation (of the latin name for western constellations)


XYZname

protected javax.vecmath.Point3d XYZname
Direction vector pointing on constellation name drawing position


XYName

protected javax.vecmath.Point3d XYName

nbSegments

private int nbSegments
Number of segments in the lines


asterism

private java.util.List<StelObject> asterism

artTexture

protected STexture artTexture

artVertex

javax.vecmath.Point3d[] artVertex

artFader

LinearFader artFader
Define whether art, lines, names and boundary must be drawn


lineFader

LinearFader lineFader

nameFader

LinearFader nameFader

boundaryFader

LinearFader boundaryFader

isolatedBoundarySegments

java.util.List<java.util.List<javax.vecmath.Point3d>> isolatedBoundarySegments

sharedBoundarySegments

java.util.List<java.util.List<javax.vecmath.Point3d>> sharedBoundarySegments

lineColor

static SColor lineColor

labelColor

static SColor labelColor

boundaryColor

static SColor boundaryColor

gravityLabel

static boolean gravityLabel
Whether labels are to be printed with gravity


singleSelected

static boolean singleSelected
Constructor Detail

Constellation

Constellation()
Method Detail

read

boolean read(java.lang.String record,
             HipStarMgr vouteCeleste)
Read Constellation datas and grab cartesian positions of stars

Parameters:
record -
vouteCeleste -
Returns:
false if can't parse record

drawOptim

void drawOptim(Projector prj)
Draw the lines for the Constellation using the coords of the stars (optimized for use thru the class ConstellationMgr only)


drawName

void drawName(SFontIfc constfont,
              Projector prj)
Draw the name


drawArtOptim

void drawArtOptim(Projector prj,
                  NavigatorIfc nav)
Draw the art texture, optimized function to be called thru a constellation manager only


isInScreen

private boolean isInScreen(Projector prj,
                           int i,
                           javax.vecmath.Point3d win,
                           javax.vecmath.Tuple3d equVision)

drawArt

void drawArt(DefaultProjector prj,
             Navigator nav)
Draw the art texture


isStarIn

Constellation isStarIn(StelObject s)

update

void update(int deltaTime)

drawBoundaryOptim

void drawBoundaryOptim(Projector prj)

getBrightestStarInConstellation

public StelObject getBrightestStarInConstellation()
Overrides:
getBrightestStarInConstellation in class StelObjectBase

getInfoString

public java.lang.String getInfoString(NavigatorIfc nav)
Write I18n information about the object in String.

Specified by:
getInfoString in class StelObject

getShortInfoString

public java.lang.String getShortInfoString(NavigatorIfc nav)
The returned String can typically be used for object labeling in the sky

Specified by:
getShortInfoString in class StelObject

getType

public StelObject.TYPE getType()
Return object's type

Specified by:
getType in class StelObjectBase

getEarthEquPos

public javax.vecmath.Point3d getEarthEquPos(NavigatorIfc nav)
Get position in earth equatorial frame

Overrides:
getEarthEquPos in class StelObjectBase

getObsJ2000Pos

public javax.vecmath.Point3d getObsJ2000Pos(NavigatorIfc nav)
observer centered J2000 coordinates

Overrides:
getObsJ2000Pos in class StelObjectBase

getMag

public float getMag(NavigatorIfc nav)
Return object's magnitude

Overrides:
getMag in class StelObjectBase
Returns:
object's magnitude

getNameI18n

public java.lang.String getNameI18n()
Overrides:
getNameI18n in class StelObjectBase

getEnglishName

public java.lang.String getEnglishName()
Description copied from class: StelObjectBase
Return object's name

Overrides:
getEnglishName in class StelObjectBase

getShortName

public java.lang.String getShortName()

setFlagLines

void setFlagLines(boolean b)

setFlagBoundaries

void setFlagBoundaries(boolean b)

setFlagName

void setFlagName(boolean b)

setFlagArt

void setFlagArt(boolean b)

getFlagLines

boolean getFlagLines()

getFlagBoundaries

boolean getFlagBoundaries()

getFlagName

boolean getFlagName()

getFlagArt

boolean getFlagArt()

setAllFlags

public void setAllFlags(Constellation cc)