Class StarGroup

    • Constructor Detail

      • StarGroup

        public StarGroup()
    • Method Detail

      • doneLoading

        public void doneLoading​(com.badlogic.gdx.assets.AssetManager manager)
        Overrides:
        doneLoading in class ParticleGroup
      • generateIndex

        public java.util.Map<java.lang.String,​java.lang.Integer> generateIndex​(com.badlogic.gdx.utils.Array<? extends ParticleGroup.ParticleBean> pointData)
        Generates the index (maps star name and id to array index)
        Parameters:
        pointData - The star data
        Returns:
        An map{string,int} mapping names/ids to indexes
      • updateFocus

        public void updateFocus​(ITimeFrameProvider time,
                                ICamera camera)
        Updates the parameters of the focus, if the focus is active in this group
        Overrides:
        updateFocus in class ParticleGroup
        Parameters:
        time - The time frame provider
        camera - The current camera
      • getPredictedPosition

        public Vector3d getPredictedPosition​(Vector3d aux,
                                             ITimeFrameProvider time,
                                             ICamera camera,
                                             boolean force)
        Overrides ParticleGroup's implementation by actually integrating the position using the proper motion and the given time.
        Specified by:
        getPredictedPosition in interface IFocus
        Overrides:
        getPredictedPosition in class ParticleGroup
        Parameters:
        aux - The out vector where the result will be stored.
        time - The time frame provider.
        camera - The camera.
        force - Whether to force the computation if time is off.
        Returns:
        The aux vector for chaining.
      • 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 ParticleGroup
      • getFuzzyRenderSize

        public double getFuzzyRenderSize​(double size,
                                         double radius,
                                         double distToCamera,
                                         double viewAngle,
                                         double thDown,
                                         double thUp)
      • getFocusSize

        public double getFocusSize()
        Description copied from class: ParticleGroup
        Default size if not in data, 1e5 km
        Overrides:
        getFocusSize in class ParticleGroup
        Returns:
        The size
      • getRadius

        public double getRadius()
        Description copied from class: SceneGraphNode
        Returns the radius in internal units
        Specified by:
        getRadius in interface IFocus
        Overrides:
        getRadius in class ParticleGroup
        Returns:
        The radius of the object, in internal units
      • getAppmag

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

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

        public double getMuAlpha()
        Description copied from interface: IProperMotion
        Returns the mu alpha in mas/yr
        Specified by:
        getMuAlpha in interface IProperMotion
        Returns:
        The mu alpha in mas/yr
      • getMuDelta

        public double getMuDelta()
        Description copied from interface: IProperMotion
        Returns the mu delta in mas/yr
        Specified by:
        getMuDelta in interface IProperMotion
        Returns:
        The mu delta in mas/yr
      • getRadialVelocity

        public double getRadialVelocity()
        Description copied from interface: IProperMotion
        Returns the radial velocity in km/s
        Specified by:
        getRadialVelocity in interface IProperMotion
        Returns:
        The radial velocity in km/s
      • getSize

        public double getSize​(int i)
        Returns the size of the particle at index i
        Overrides:
        getSize in class ParticleGroup
        Parameters:
        i - The index
        Returns:
        The size
      • getCatalogSource

        public int getCatalogSource()
        Description copied from interface: IStarFocus
        Gets the catalog source of this star. Possible values are:
        • -1: Unknown
        • 1: Gaia
        • 2: Hipparcos (HYG)
        • 3: Tycho
        • 4: Other
        Specified by:
        getCatalogSource in interface IStarFocus
        Returns:
        The catalog source number
      • 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
        Returns:
        The HIP number
      • getClosestSize

        public double getClosestSize()
        Description copied from interface: IStarFocus
        Returns the size of the closest star
        Specified by:
        getClosestSize in interface IStarFocus
        Returns:
        The size of the closest star
      • getClosestPos

        public Vector3d getClosestPos​(Vector3d out)
        Description copied from interface: IStarFocus
        Returns the position of the closest star in camera coordinates
        Specified by:
        getClosestPos in interface IStarFocus
        Parameters:
        out - The out vector
        Returns:
        The out vector with the position
      • getClosestCol

        public float[] getClosestCol()
        Description copied from interface: IStarFocus
        Returns the color of the closest star
        Specified by:
        getClosestCol in interface IStarFocus
        Returns:
        The color in rgb
      • 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
        Overrides:
        getFocus in class ParticleGroup
        Parameters:
        name - The name in lower case
      • getAbsolutePosition

        public Vector3d getAbsolutePosition​(java.lang.String name,
                                            Vector3d aux)
        Description copied from interface: IFocus
        Returns the absolute position of the entity identified by name within this entity in the native reference system
        Specified by:
        getAbsolutePosition in interface IFocus
        Overrides:
        getAbsolutePosition in class ParticleGroup
        Parameters:
        name - The name (lowercase) of the entity to get the position from (useful in case of star groups)
        aux - Vector3d to put the return value
        Returns:
        The absolute position of the entity if it exists, null otherwise
      • fetchPosition

        protected Vector3d fetchPosition​(ParticleGroup.ParticleBean pb,
                                         Vector3d campos,
                                         Vector3d destination,
                                         double deltaYears)
        Description copied from class: ParticleGroup
        Fetches the real position of the particle. It will apply the necessary integrations (i.e. proper motion).
        Overrides:
        fetchPosition in class ParticleGroup
        Parameters:
        pb - The particle bean
        campos - The position of the camera. If null, the camera position is not subtracted so that the coordinates are given in the global reference system instead of the camera reference system.
        destination - The destination factor
        deltaYears - The delta years
        Returns:
        The vector for chaining
      • getDeltaYears

        protected double getDeltaYears()
        Description copied from class: ParticleGroup
        Returns the delta years to integrate the proper motion.
        Overrides:
        getDeltaYears in class ParticleGroup
        Returns:
      • setEpoch

        public void setEpoch​(java.lang.Double epochJd)
        Sets the epoch to use for the stars in this group
        Parameters:
        epochJd - The epoch in julian days (days since January 1, 4713 BCE)
      • getEpoch

        public java.lang.Double getEpoch()
        Returns the epoch in Julian Days used for the stars in this group
        Returns:
        The epoch in julian days
      • dispose

        public void dispose()
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable
        Overrides:
        dispose in class ParticleGroup
      • getColor

        public float getColor​(int index)
      • getStarGroup

        public static StarGroup getStarGroup​(java.lang.String name,
                                             java.util.List<ParticleGroup.ParticleBean> data,
                                             DatasetOptions dops)
        Creates a default star group with some parameters, given the name and data
        Parameters:
        name - The name of the star group. Any occurrence of '%%SGID%%' will be replaced with the id of the star group
        data - The data of the star group
        dops - The dataset options
        Returns:
        A new star group with the given parameters
      • getDefaultStarGroup

        public static StarGroup getDefaultStarGroup​(java.lang.String name,
                                                    java.util.List<ParticleGroup.ParticleBean> data)
        Creates a default star group with some sane parameters, given the name and the data
        Parameters:
        name - The name of the star group. Any occurrence of '%%SGID%%' in name will be replaced with the id of the star group
        data - The data of the star group
        Returns:
        A new star group with sane parameters
      • getDefaultStarGroup

        public static StarGroup getDefaultStarGroup​(java.lang.String name,
                                                    java.util.List<ParticleGroup.ParticleBean> data,
                                                    boolean fullInit)
        Creates a default star group with some sane parameters, given the name and the data
        Parameters:
        name - The name of the star group. Any occurrence of '%%SGID%%' in name will be replaced with the id of the star group
        data - The data of the star group
        fullInit - Initializes the group right away
        Returns:
        A new star group with sane parameters
      • updateMetadata

        public void updateMetadata​(ITimeFrameProvider time,
                                   ICamera camera)
        Updates the additional information array, to use for sorting. In stars, we need to take into account the proper motion and the brightness.
        Overrides:
        updateMetadata in class ParticleGroup
        Parameters:
        time - The current time frame provider
        camera - The camera