Class AbstractPositionEntity

    • Field Detail

      • pos

        public Vector3d pos
        Position of this entity in the local reference system. The units are Constants.U_TO_KM by default.
      • coordinates

        protected IBodyCoordinates coordinates
        Coordinates provider. Helps updating the position at each time step.
      • posSph

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

        public float size
        Size factor in internal units.
      • distToCamera

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

        public double viewAngle
        The view angle, in radians.
      • viewAngleApparent

        public double viewAngleApparent
        The view angle corrected with the field of view angle, in radians.
      • cc

        public float[] cc
        Base color
      • copy

        public boolean copy
        Is this just a copy?
      • octantId

        public java.lang.Long octantId
        The id of the octant it belongs to, if any
    • Constructor Detail

      • AbstractPositionEntity

        protected AbstractPositionEntity()
      • AbstractPositionEntity

        public AbstractPositionEntity​(java.lang.String name,
                                      SceneGraphNode parent)
      • AbstractPositionEntity

        public AbstractPositionEntity​(SceneGraphNode parent)
      • AbstractPositionEntity

        public AbstractPositionEntity​(java.lang.String name)
    • Method Detail

      • doneLoading

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

        public boolean isCopy()
      • getPosition

        public Vector3d getPosition​(Vector3d aux)
        Returns the position of this entity in the internal reference system.
        Parameters:
        aux - The vector where the result will be put
        Returns:
        The aux vector with the position
      • getNext

        public IFocus getNext​(ITimeFrameProvider time,
                              ICamera camera,
                              boolean force)
        Gets a copy of this entity which mimics its state in the next time step with position, orientation, etc.
        Returns:
        A copy of this entity in the next time step
      • getPredictedPosition

        public Vector3d getPredictedPosition​(Vector3d aux,
                                             ITimeFrameProvider time,
                                             ICamera camera,
                                             boolean force)
        Gets the position of this entity in the next time step in the internal reference system using the given time provider and the given camera.
        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.
      • mustUpdatePosition

        protected boolean mustUpdatePosition​(ITimeFrameProvider time)
        Whether position must be recomputed for this entity. By default, only when time is on
        Parameters:
        time - The current time
        Returns:
        True if position should be recomputed for this entity
      • getAbsolutePosition

        public Vector3d getAbsolutePosition​(Vector3d out)
        Returns the absolute position of this entity in the native coordinates (equatorial system) and internal units
        Parameters:
        out - Auxiliary vector to put the result in
        Returns:
        The vector with the position
      • getAbsolutePosition

        public Vector3d getAbsolutePosition​(java.lang.String name,
                                            Vector3d aux)
      • getAbsoluteOrientation

        public Matrix4d getAbsoluteOrientation​(Matrix4d aux)
      • addToRenderLists

        protected abstract void addToRenderLists​(ICamera camera)
        Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
      • updateLocalValues

        public abstract void updateLocalValues​(ITimeFrameProvider time,
                                               ICamera camera)
        This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.
        Parameters:
        time -
        camera -
      • getRadius

        public double getRadius()
        Returns the radius in internal units
        Returns:
        The radius of the object, in internal units
      • getHeight

        public double getHeight​(Vector3d camPos)
      • getHeight

        public double getHeight​(Vector3d camPos,
                                boolean useFuturePosition)
      • getHeightScale

        public double getHeightScale()
      • getSize

        public double getSize()
        Returns the size (diameter) of this entity in internal units.
        Returns:
        The size in internal units.
      • setSize

        public void setSize​(java.lang.Double size)
        Sets the absolute size (diameter) of this entity
        Parameters:
        size - The diameter in internal units
      • setSize

        public void setSize​(java.lang.Long size)
        Sets the absolute size (diameter) of this entity
        Parameters:
        size - The diameter in internal units
      • getPosSph

        public Vector2d getPosSph()
      • getAlpha

        public double getAlpha()
      • getDelta

        public double getDelta()
      • setColor

        public void setColor​(double[] color)
      • setColor

        public void setColor​(float[] color)
      • computeFuturePosition

        public Vector3d computeFuturePosition()
      • getSimpleCopy

        public <T extends SceneGraphNode> T getSimpleCopy()
        Gets a copy of this object but does not copy its parent or children
        Overrides:
        getSimpleCopy in class SceneGraphNode
        Returns:
        The copied object
      • getDistToCamera

        public double getDistToCamera()
        Returns the current distance to the camera in internal units.
        Returns:
        The current distance to the camera, in internal units.
      • getViewAngle

        public double getViewAngle()
        Returns the current view angle of this entity, in radians.
        Returns:
        The view angle in radians.
      • getViewAngleApparent

        public double getViewAngleApparent()
        Returns the current apparent view angle (view angle corrected with the field of view) of this entity, in radians.
        Returns:
        The apparent view angle in radians.
      • setLabelcolor

        public void setLabelcolor​(float[] labelColor)
      • setLabelcolor

        public void setLabelcolor​(double[] labelColor)