Class Body

java.lang.Object
gaiasky.scene.component.Body
All Implemented Interfaces:
com.badlogic.ashley.core.Component, ICopy

public class Body extends Object implements com.badlogic.ashley.core.Component, ICopy
  • Field Details

    • pos

      public Vector3b pos
      Position of this entity in the local reference system and internal units. This holds the position of the entity in the reference system of its parent. It is not the absolute position. If the entity has a ProperMotion component, the proper motion is applied for the current time. The position at epoch is kept in posEpoch.
    • posEpoch

      public Vector3b posEpoch
      A copy of the original position, if any. If the entity has a ProperMotion component, this is the position at epoch ProperMotion.epochJd.
    • posSph

      public Vector2d posSph
      Position in the equatorial system; ra, dec.
    • size

      public float size
      Body size in internal units.
    • sizeInUnitsFlag

      public boolean sizeInUnitsFlag
      This flag indicates whether the size has already been set using the correct units. This is for backward compatibility with the data files.
    • sizeIsRadiusFlag

      public boolean sizeIsRadiusFlag
      This flag enables backwards-compatibility. When true, the body size is assumed to be a radius, and will be doubled in the initialization. Setting the size using any of the setRadius() methods sets this to false.
    • distToCamera

      public double distToCamera
      The distance to the camera from the focus center.
    • solidAngle

      public double solidAngle
      The view angle, in radians.
    • solidAngleApparent

      public double solidAngleApparent
      The view angle corrected with the field of view angle, in radians.
    • color

      public float[] color
      Base RGB color
    • labelColor

      public float[] labelColor
    • positionSetInScript

      public boolean positionSetInScript
      Flag to control whether the position of this object has been set in a script.
  • Constructor Details

    • Body

      public Body()
  • Method Details

    • setPos

      public void setPos(Vector3b pos)
    • setPos

      public void setPos(double[] pos)
    • setPosition

      public void setPosition(double[] pos)
    • setPosKm

      public void setPosKm(double[] pos)
    • setPositionKm

      public void setPositionKm(double[] pos)
    • setPosPc

      public void setPosPc(double[] pos)
    • setPositionPc

      public void setPositionPc(double[] pos)
    • setPosition

      public void setPosition(int[] pos)
    • updatePosEpoch

      public void updatePosEpoch()
      Sets the position at epoch as a copy of the position. This is usually done at initialization only.
    • setSize

      public void setSize(Double size)
    • setSizeKm

      public void setSizeKm(Double sizeKm)
    • setSizepc

      public void setSizepc(Double sizePc)
    • setSizePc

      public void setSizePc(Double sizePc)
    • setSizeM

      public void setSizeM(Double sizeM)
    • setSizeAU

      public void setSizeAU(Double sizeAU)
    • setRadius

      public void setRadius(Double radius)
    • setRadiusKm

      public void setRadiusKm(Double radiusKm)
    • setRadiusPc

      public void setRadiusPc(Double radiusPc)
    • setDiameter

      public void setDiameter(Double diameter)
    • setDiameterKm

      public void setDiameterKm(Double diameterKm)
    • setDiameterPc

      public void setDiameterPc(Double diameterPc)
    • setColor

      public void setColor(double[] color)
      Sets the object color, as an RGBA double array.
      Parameters:
      color - The color.
    • setColor

      public void setColor(float[] color)
      Sets the object color, as an RGBA float array.
      Parameters:
      color - The color.
    • setLabelColor

      public void setLabelColor(double[] color)
      Sets the label color, as an RGBA double array.
      Parameters:
      color - The label color.
    • setLabelcolor

      @Deprecated public void setLabelcolor(double[] color)
      Deprecated.
    • setLabelColor

      public void setLabelColor(float[] color)
      Sets the label color, as an RGBA float array.
      Parameters:
      color - The label color.
    • setLabelcolor

      @Deprecated public void setLabelcolor(float[] color)
      Deprecated.
    • getCopy

      public com.badlogic.ashley.core.Component getCopy(com.badlogic.ashley.core.Engine engine)
      Specified by:
      getCopy in interface ICopy