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 Link icon

    • pos Link icon

      public Vector3Q 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. The absolute position is held at GraphNode.translation.
    • posEpoch Link icon

      public Vector3Q 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 Link icon

      public Vector2D posSph
      Position in the equatorial system; ra, dec.
    • size Link icon

      public float size
      Body size in internal units.
    • sizeInUnitsFlag Link icon

      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 Link icon

      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 Link icon

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

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

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

      public float[] color
      Base RGB color.
    • labelColor Link icon

      public float[] labelColor
    • cameraCollision Link icon

      public boolean cameraCollision
      The bounding sphere of this object collides with the camera, preventing it from entering its radius.
    • positionSetInScript Link icon

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

    • Body Link icon

      public Body()
  • Method Details Link icon

    • setPos Link icon

      public void setPos(Vector3Q pos)
    • setPos Link icon

      public void setPos(double[] pos)
    • setPosition Link icon

      public void setPosition(double[] pos)
    • setPosKm Link icon

      public void setPosKm(double[] pos)
    • setPositionKm Link icon

      public void setPositionKm(double[] pos)
    • setPosPc Link icon

      public void setPosPc(double[] pos)
    • setPositionPc Link icon

      public void setPositionPc(double[] pos)
    • setPosition Link icon

      public void setPosition(int[] pos)
    • updatePosEpoch Link icon

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

      public void setSize(Double size)
    • setSizeKm Link icon

      public void setSizeKm(Double sizeKm)
    • setSizepc Link icon

      public void setSizepc(Double sizePc)
    • setSizePc Link icon

      public void setSizePc(Double sizePc)
    • setSizeM Link icon

      public void setSizeM(Double sizeM)
    • setSizeAU Link icon

      public void setSizeAU(Double sizeAU)
    • setRadius Link icon

      public void setRadius(Double radius)
    • setRadiusKm Link icon

      public void setRadiusKm(Double radiusKm)
    • setRadiusPc Link icon

      public void setRadiusPc(Double radiusPc)
    • setDiameter Link icon

      public void setDiameter(Double diameter)
    • setDiameterKm Link icon

      public void setDiameterKm(Double diameterKm)
    • setDiameterPc Link icon

      public void setDiameterPc(Double diameterPc)
    • setColor Link icon

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

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

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

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

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

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

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