Class Star

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, I3DTextRenderable, ILineRenderable, IModelRenderable, IQuadRenderable, IRenderable, IFocus, IProperMotion, IStarContainer, IStarFocus, IVisibilitySwitch, IPosition

public class Star extends Particle
Represents a single star. Used for star systems with single star objects having children nodes.
  • Field Details

    • hip

      public int hip
      HIP number, negative if non-existent
  • Constructor Details

    • Star

      public Star()
    • Star

      public Star(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, long starID)
    • Star

      public Star(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID)
      Creates a new Star object
      Parameters:
      pos - The position of the star in equatorial cartesian coordinates
      appMag - The apparent magnitude
      absMag - The absolute magnitude
      colorBV - The B-V color index
      names - The proper names of the star, if any
      ra - in degrees
      dec - in degrees
      starID - The star id
    • Star

      public Star(Vector3b pos, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID, int hip, byte source)
      Creates a new Star object
      Parameters:
      pos - The position of the star in equatorial cartesian coordinates
      appMag - The apparent magnitude
      absMag - The absolute magnitude
      colorBV - The B-V color index
      names - The proper names of the star, if any
      ra - in degrees
      dec - in degrees
      starID - The star id
      hip - The HIP identifier
      source - Catalog source. 1: Gaia, 2: HIP, 3: TYC, -1: Unknown
    • Star

      public Star(Vector3b pos, com.badlogic.gdx.math.Vector3 pm, com.badlogic.gdx.math.Vector3 pmSph, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID)
      Creates a new Star object
      Parameters:
      pos - The position of the star in equatorial cartesian coordinates
      pm - The proper motion of the star in equatorial cartesian coordinates
      pmSph - The proper motion with muAlpha, muDelta, radVel.
      appMag - The apparent magnitude
      absMag - The absolute magnitude
      colorBV - The B-V color index
      names - The proper names of the star, if any
      ra - in degrees
      dec - in degrees
      starID - The star id
    • Star

      public Star(Vector3b pos, com.badlogic.gdx.math.Vector3 pm, com.badlogic.gdx.math.Vector3 pmSph, float appMag, float absMag, float colorBV, String[] names, float ra, float dec, long starID, int hip, byte source)
      Creates a new Star object
      Parameters:
      pos - The position of the star in equatorial cartesian coordinates
      pm - The proper motion of the star in equatorial cartesian coordinates
      pmSph - The proper motion with muAlpha, muDelta, radVel.
      appMag - The apparent magnitude
      absMag - The absolute magnitude
      colorBV - The B-V color index
      names - The proper names of the star, if any
      ra - in degrees
      dec - in degrees
      starID - The star id
      hip - HIP number, if any
      source - Catalog source. 1: Gaia, 2: HIP, 3: TYC, -1: Unknown
  • Method Details

    • initialize

      public void initialize()
      Overrides:
      initialize in class Particle
    • setDerivedAttributes

      protected void setDerivedAttributes()
      Overrides:
      setDerivedAttributes in class Particle
    • doneLoading

      public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
      Overrides:
      doneLoading in class Particle
    • addToRenderLists

      protected void addToRenderLists(ICamera camera)
      Description copied from class: SceneGraphNode
      Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
      Overrides:
      addToRenderLists in class Particle
    • render

      public void render(IntModelBatch modelBatch, float alpha, double t, RenderingContext renderContext, SceneGraphRenderer.RenderGroup group)
      Description copied from class: Particle
      Model rendering
      Specified by:
      render in interface IModelRenderable
      Overrides:
      render in class Particle
    • addHit

      public void addHit(int screenX, int screenY, int w, int h, int minPixDist, NaturalCamera camera, com.badlogic.gdx.utils.Array<IFocus> hits)
      Description copied from interface: IFocus
      Adds this focus to the hits list if it is hit by the [screenX, screenY] position.
      Specified by:
      addHit in interface IFocus
      Overrides:
      addHit in class CelestialBody
      Parameters:
      screenX - The x position of the hit.
      screenY - The y position of the hit.
      w - The viewport width.
      h - The viewport height.
      minPixDist - The minimum pixel distance to consider as hit.
      camera - The camera.
      hits - The list where to add the element.
    • toString

      public String toString()
      Overrides:
      toString in class SceneGraphNode
    • getPmX

      public double getPmX()
      Overrides:
      getPmX in class CelestialBody
    • getPmY

      public double getPmY()
      Overrides:
      getPmY in class CelestialBody
    • getPmZ

      public double getPmZ()
      Overrides:
      getPmZ in class CelestialBody
    • computeViewAngle

      protected double computeViewAngle(float fovFactor)
      Overrides:
      computeViewAngle in class CelestialBody
    • getHip

      public int getHip()
      Description copied from interface: IStarFocus
      Returns the HIP number of this star, or negative if it has no HIP number
      Specified by:
      getHip in interface IStarFocus
      Overrides:
      getHip in class Particle
      Returns:
      The HIP number
    • addToIndex

      protected void addToIndex(Map<String,SceneGraphNode> map)
      Description copied from class: SceneGraphNode
      Special actions to be taken for this object when adding to the index.
      Overrides:
      addToIndex in class SceneGraphNode
      Parameters:
      map - The index.
    • removeFromIndex

      protected void removeFromIndex(Map<String,SceneGraphNode> map)
      Description copied from class: SceneGraphNode
      Special actions to be taken for this object when removing from the index. Must implement if addToIndex is implemented.
      Overrides:
      removeFromIndex in class SceneGraphNode
      Parameters:
      map - The index.