org.stellarium.astro
Class Nebula

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

public class Nebula
extends StelObjectBase

Version:
0.8.2
Author:
Jerome Beau, Fred Simon

Nested Class Summary
static class Nebula.NebulaType
           
 
Nested classes/interfaces inherited from class org.stellarium.StelObject
StelObject.TYPE
 
Field Summary
private  double angularSize
          Angular size in radians
(package private) static SColor circleColor
           
(package private) static double circleScale
          Define the sclaing of the hints circle
private  java.lang.String credit
          Nebula image credit
private static char endl
           
(package private)  java.lang.String englishName
          English name
(package private) static boolean flagBright
          Define if nebulae must be drawn in bright mode
(package private) static double hintsBrightness
           
private  int icNb
          Index Catalog number
private  double incLum
          Local counter for symbol animation
(package private) static SColor labelColor
           
private  double luminance
          Object luminance to use (value computed to compensate the texture avergae luminosity)
(package private)  double mag
          Apparent magnitude
private  int messierNb
          Messier Catalog number
(package private)  java.lang.String nameI18
          Nebula name
private  STexture nebTex
          Texture
(package private) static SFontIfc nebulaFontIfc
          Font used for names printing
private  int ngcNb
          New General Catalog number
(package private)  Nebula.NebulaType nType
          Nebula Type
(package private) static double RADIUS_NEB
           
private  double texAvgLuminance
          avg luminance of the texture (saved here for performance)
(package private) static STexture texCircle
          The symbolic circle texture
private  javax.vecmath.Point3d[] texQuadVertex
          The 4 vertex used to draw the nebula texture
private static java.lang.String[] UNKNOWN_TYPE_NAMES
           
(package private)  javax.vecmath.Point3d XY
          Store temporary 2D position
(package private)  javax.vecmath.Point3d XYZ
          Cartesian equatorial position
 
Fields inherited from class org.stellarium.StelObjectBase
DEFAULT_COLOR
 
Constructor Summary
Nebula()
           
 
Method Summary
(package private)  void drawChart(DefaultProjector prj, Navigator nav)
           
(package private)  void drawCircle(DefaultProjector prj, Navigator nav)
           
(package private)  void drawName(DefaultProjector prj)
           
(package private)  void drawNoTex(DefaultProjector prj, Navigator nav, ToneReproductor eye)
           
(package private)  void drawTex(DefaultProjector prj, Navigator nav, ToneReproductor eye)
           
 double getAngularSize()
           
 double getCloseFOV(NavigatorIfc nav)
          Tree.Return the best FOV in degree to use for a close view of the object
 javax.vecmath.Point3d getEarthEquPos(NavigatorIfc nav)
          Get position in earth equatorial frame
 int getIcNb()
           
 java.lang.String getInfoString(NavigatorIfc nav)
          Write I18n information about the object in wstring.
 int getMessierNb()
           
 int getNgcNb()
           
 float getOnScreenSize(Projector prj, NavigatorIfc nav)
          Return the radius of a circle containing the object on screen
 java.lang.String getShortInfoString(NavigatorIfc nav)
          The returned wstring can typically be used for object labeling in the sky
 StelObject.TYPE getType()
          Tree.Return object's type
 java.lang.String getTypeString()
           
(package private)  boolean hasTex()
           
(package private)  boolean readNGC(java.lang.String recordstr)
          Read the record entry and fill the members
(package private)  void readTexture(java.lang.String record)
          Read nebula data from file and compute x,y and z;
(package private)  void setCircleColor(SColor v)
           
 void setEnglishName(java.lang.String englishName)
           
(package private)  void setLabelColor(SColor v)
           
 void setMessierNb(int mNb)
           
 void translateName(Translator trans)
          Translate nebula name using the passed translator
 
Methods inherited from class org.stellarium.StelObjectBase
deleteTextures, drawPointer, getBrightestStarInConstellation, getEnglishName, getMag, getMag, getNameI18n, getObsJ2000Pos, 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

endl

private static final char endl
See Also:
Constant Field Values

UNKNOWN_TYPE_NAMES

private static final java.lang.String[] UNKNOWN_TYPE_NAMES

RADIUS_NEB

static final double RADIUS_NEB
See Also:
Constant Field Values

messierNb

private int messierNb
Messier Catalog number


ngcNb

private int ngcNb
New General Catalog number


icNb

private int icNb
Index Catalog number


englishName

java.lang.String englishName
English name


nameI18

java.lang.String nameI18
Nebula name


credit

private java.lang.String credit
Nebula image credit


mag

double mag
Apparent magnitude


angularSize

private double angularSize
Angular size in radians


XYZ

javax.vecmath.Point3d XYZ
Cartesian equatorial position


XY

javax.vecmath.Point3d XY
Store temporary 2D position


nType

Nebula.NebulaType nType
Nebula Type


nebTex

private STexture nebTex
Texture


texQuadVertex

private javax.vecmath.Point3d[] texQuadVertex
The 4 vertex used to draw the nebula texture


luminance

private double luminance
Object luminance to use (value computed to compensate the texture avergae luminosity)


texAvgLuminance

private double texAvgLuminance
avg luminance of the texture (saved here for performance)


incLum

private double incLum
Local counter for symbol animation


texCircle

static STexture texCircle
The symbolic circle texture


nebulaFontIfc

static SFontIfc nebulaFontIfc
Font used for names printing


hintsBrightness

static double hintsBrightness

labelColor

static SColor labelColor

circleColor

static SColor circleColor

circleScale

static double circleScale
Define the sclaing of the hints circle


flagBright

static boolean flagBright
Define if nebulae must be drawn in bright mode

Constructor Detail

Nebula

Nebula()
Method Detail

getEarthEquPos

public javax.vecmath.Point3d getEarthEquPos(NavigatorIfc nav)
Description copied from class: StelObjectBase
Get position in earth equatorial frame

Overrides:
getEarthEquPos in class StelObjectBase

getInfoString

public java.lang.String getInfoString(NavigatorIfc nav)
Description copied from class: StelObject
Write I18n information about the object in wstring.

Specified by:
getInfoString in class StelObject

getShortInfoString

public java.lang.String getShortInfoString(NavigatorIfc nav)
Description copied from class: StelObject
The returned wstring can typically be used for object labeling in the sky

Specified by:
getShortInfoString in class StelObject

getCloseFOV

public double getCloseFOV(NavigatorIfc nav)
Description copied from class: StelObjectBase
Tree.Return the best FOV in degree to use for a close view of the object

Overrides:
getCloseFOV in class StelObjectBase

readTexture

void readTexture(java.lang.String record)
           throws StellariumException
Read nebula data from file and compute x,y and z;

Parameters:
record - One line in the fab file representing one nebula entry
Throws:
StellariumException

drawChart

void drawChart(DefaultProjector prj,
               Navigator nav)

drawTex

void drawTex(DefaultProjector prj,
             Navigator nav,
             ToneReproductor eye)

drawCircle

void drawCircle(DefaultProjector prj,
                Navigator nav)

drawNoTex

void drawNoTex(DefaultProjector prj,
               Navigator nav,
               ToneReproductor eye)

getOnScreenSize

public float getOnScreenSize(Projector prj,
                             NavigatorIfc nav)
Return the radius of a circle containing the object on screen

Overrides:
getOnScreenSize in class StelObjectBase

drawName

void drawName(DefaultProjector prj)

hasTex

boolean hasTex()

readNGC

boolean readNGC(java.lang.String recordstr)
Read the record entry and fill the members

Parameters:
recordstr -
Returns:
true if known nebula type, false otherwise

getTypeString

public java.lang.String getTypeString()

translateName

public void translateName(Translator trans)
Translate nebula name using the passed translator

Parameters:
trans -

getType

public StelObject.TYPE getType()
Description copied from class: StelObjectBase
Tree.Return object's type

Specified by:
getType in class StelObjectBase

setLabelColor

void setLabelColor(SColor v)

setCircleColor

void setCircleColor(SColor v)

getAngularSize

public double getAngularSize()

getMessierNb

public int getMessierNb()

setMessierNb

public void setMessierNb(int mNb)

getNgcNb

public int getNgcNb()

getIcNb

public int getIcNb()

setEnglishName

public void setEnglishName(java.lang.String englishName)