Class CelestialBody

    • Field Detail

      • TH_OVER_FACTOR

        public float TH_OVER_FACTOR
      • absmag

        public float absmag
        Absolute magnitude, m = -2.5 log10(flux), with the flux at 10 pc
      • appmag

        public float appmag
        Apparent magnitude, m = -2.5 log10(flux)
      • ccPale

        public float[] ccPale
        Red, green and blue colors and their revamped cousins
      • ccTransit

        public float[] ccTransit
        Colour for stars that have been observed by Gaia
      • colorbv

        public float colorbv
        The B-V color index, calculated as the magnitude in B minus the magnitude in V
      • transits

        public int transits
        Number of times this body has been observed by Gaia
      • lastTransitIncrease

        public long lastTransitIncrease
        Last observations increase in ms
      • compalpha

        public float compalpha
        Component alpha mirror
      • coordinatesTimeOverflow

        protected boolean coordinatesTimeOverflow
        Whether we are out of the time baseline range in the algorithm that works out the coordinates of this body
    • Constructor Detail

      • CelestialBody

        public CelestialBody()
        Simple constructor
    • Method Detail

      • THRESHOLD_NONE

        public abstract double THRESHOLD_NONE()
        radius/distance limit for rendering at all. If angle is smaller than this quantity, no rendering happens.
      • THRESHOLD_QUAD

        public abstract double THRESHOLD_QUAD()
        radius/distance limit for rendering as shader. If angle is any bigger, we render as a model.
      • THRESHOLD_POINT

        public abstract double THRESHOLD_POINT()
        radius/distance limit for rendering as point. If angle is any bigger, we render with shader.
      • getFuzzyRenderSize

        public float getFuzzyRenderSize​(ICamera camera)
      • getViewAnglePow

        protected float getViewAnglePow()
      • getThOverFactorScl

        protected float getThOverFactorScl()
      • getThOverFactor

        protected float getThOverFactor​(ICamera camera)
      • setColor2Data

        protected void setColor2Data()
      • getInnerRad

        public abstract float getInnerRad()
      • setMag

        public void setMag​(java.lang.Double mag)
      • setAbsmag

        public void setAbsmag​(java.lang.Double absmag)
      • setAppmag

        public void setAppmag​(java.lang.Double appmag)
      • getAppmag

        public float getAppmag()
        Description copied from interface: IFocus
        Gets the apparent magnitude
        Specified by:
        getAppmag in interface IFocus
        Returns:
        The apparent magnitude
      • getAbsmag

        public float getAbsmag()
        Description copied from interface: IFocus
        Gets the absolute magnitude
        Specified by:
        getAbsmag in interface IFocus
        Returns:
        The absolute magnitude
      • isActive

        public boolean isActive()
        Description copied from interface: IFocus
        Returns whether this focus object is active or not. Useful for particle groups
        Specified by:
        isActive in interface IFocus
        Returns:
        The active status
      • addFocusableObjects

        public void addFocusableObjects​(com.badlogic.gdx.utils.Array<IFocus> list)
        Adds all the children that are focusable objects to the list.
        Overrides:
        addFocusableObjects in class SceneGraphNode
        Parameters:
        list -
      • setSize

        public void setSize​(java.lang.Double size)
        Sets the size of this entity in kilometers
        Overrides:
        setSize in class AbstractPositionEntity
        Parameters:
        size - The size in km
      • isStar

        public boolean isStar()
      • setRotation

        public void setRotation​(RotationComponent rc)
        Sets the rotation period in hours
      • withinMagLimit

        public boolean withinMagLimit()
        Description copied from interface: IFocus
        Returns true if the focus is within the magnitude limit defined in GlobalConf
        Specified by:
        withinMagLimit in interface IFocus
        Returns:
        True if focus within magnitude limit
      • updateTransitNumber

        public void updateTransitNumber​(boolean visible,
                                        ITimeFrameProvider time,
                                        FovCamera fcamera)
        Updates the transit number of this body if visible is true and it is a new transit. It also updates the colour if needed.
        Parameters:
        visible -
        time -
      • renderText

        public boolean renderText()
        Description copied from interface: I3DTextRenderable
        Tells whether the text must be rendered or not for this entity
        Specified by:
        renderText in interface I3DTextRenderable
        Returns:
        True if text must be rendered
      • textColour

        public float[] textColour()
        Description copied from interface: I3DTextRenderable
        Returns an array with the text colour in the fashion [r, g, b, a]
        Specified by:
        textColour in interface I3DTextRenderable
        Returns:
        Array with the colour
      • textScale

        public float textScale()
        Description copied from interface: I3DTextRenderable
        Returns the text scale for the scale varying in the shader
        Specified by:
        textScale in interface I3DTextRenderable
        Returns:
        The scale
      • labelSizeConcrete

        protected float labelSizeConcrete()
      • labelFactor

        protected abstract float labelFactor()
      • labelMax

        protected abstract float labelMax()
      • isLabel

        public boolean isLabel()
        Description copied from interface: I3DTextRenderable
        Is it a label or another kind of text?
        Specified by:
        isLabel in interface I3DTextRenderable
        Returns:
        Whether this is a label
      • getPmX

        public double getPmX()
      • getPmY

        public double getPmY()
      • getPmZ

        public double getPmZ()
      • getRotationComponent

        public RotationComponent getRotationComponent()
        Description copied from interface: IFocus
        Returns the rotation component of this focus
        Specified by:
        getRotationComponent in interface IFocus
        Returns:
        The rotation component. Can be null
      • getOrientationQuaternion

        public Quaterniond getOrientationQuaternion()
        Description copied from interface: IFocus
        Returns the orientation quaternion of this focus
        Specified by:
        getOrientationQuaternion in interface IFocus
        Returns:
        The orientation quaternion. Can be null
      • 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
        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
      • checkClickDistance

        protected boolean checkClickDistance​(int screenX,
                                             int screenY,
                                             com.badlogic.gdx.math.Vector3 pos,
                                             NaturalCamera camera,
                                             com.badlogic.gdx.graphics.PerspectiveCamera pcamera,
                                             double pixelSize)
      • computeViewAngle

        protected double computeViewAngle​(float fovFactor)
      • checkHitCondition

        protected boolean checkHitCondition()
      • makeFocus

        public void makeFocus()
        Description copied from interface: IFocus
        Hook that runs when the candidate is actually made focus
        Specified by:
        makeFocus in interface IFocus
      • getCandidateId

        public long getCandidateId()
        Description copied from interface: IFocus
        Returns the id of the focus candidate of this object. Defaults to IFocus.getId()
        Specified by:
        getCandidateId in interface IFocus
        Returns:
        The id of the candidate
      • getCandidateName

        public java.lang.String getCandidateName()
        Description copied from interface: IFocus
        Returns the name of the focus candidate of this object. Defaults to IFocus.getName()
        Specified by:
        getCandidateName in interface IFocus
        Returns:
        The name of the candidate
      • getCandidateViewAngleApparent

        public double getCandidateViewAngleApparent()
        Description copied from interface: IFocus
        Returns the candidate apparent view angle (view angle corrected with the field of view) of this entity, in radians
        Specified by:
        getCandidateViewAngleApparent in interface IFocus
        Returns:
        The apparent view angle in radians
      • isCoordinatesTimeOverflow

        public boolean isCoordinatesTimeOverflow()
        Description copied from interface: IFocus
        Checks whether this foucs is within its valid time range, so that it can be used as a focus
        Specified by:
        isCoordinatesTimeOverflow in interface IFocus
        Returns:
        Whether the focus object is within its valid time range
      • setAltname

        public void setAltname​(java.lang.String altname)
      • getAltname

        public java.lang.String getAltname()
      • addToIndex

        protected void addToIndex​(com.badlogic.gdx.utils.ObjectMap<java.lang.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​(com.badlogic.gdx.utils.ObjectMap<java.lang.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
      • getFocus

        public IFocus getFocus​(java.lang.String name)
        Description copied from interface: IFocus
        Prepares the candidate with the given name
        Specified by:
        getFocus in interface IFocus
        Parameters:
        name - The name in lower case
      • isValidPosition

        public boolean isValidPosition()
        Description copied from class: SceneGraphNode
        Returns whether the current position is valid (usually, when there is no coordinates overflow)
        Overrides:
        isValidPosition in class SceneGraphNode
        Returns: