Interface ISceneGraph

  • All Superinterfaces:
    All Known Implementing Classes:
    AbstractSceneGraph, SceneGraph

    public interface ISceneGraph
    extends com.badlogic.gdx.utils.Disposable
    Defines the interface for any scene graph implementation
    • Method Detail

      • initialize

        void initialize​(com.badlogic.gdx.utils.Array<SceneGraphNode> nodes,
                        ITimeFrameProvider time,
                        boolean hasOctree,
                        boolean hasStarGroup)
        Initializes the scene graph
        nodes - The list of nodes
        time - The time provider
        hasOctree - Whether the list of nodes contains an octree
        hasStarGroup - Whether the list contains a star group
      • insert

        void insert​(SceneGraphNode node,
                    boolean addToIndex)
        Inserts a node
        node - The node to add
        addToIndex - Whether to add the ids of this node to the index
      • remove

        void remove​(SceneGraphNode node,
                    boolean removeFromIndex)
        Removes a node
        node - The node to remove
        removeFromIndex - Whether to remove the ids of this node from the index
      • update

        void update​(ITimeFrameProvider time,
                    ICamera camera)
        Updates the nodes of this scene graph
        time - The current time provider
        camera - The current camera
      • containsNode

        boolean containsNode​(java.lang.String name)
        Whether this scene graphs contains a node with the given name
        name - The name
        True if this scene graph contains the node, false otherwise
      • getNode

        SceneGraphNode getNode​(java.lang.String name)
        Returns the node with the given name, or null if it does not exist.
        name - The name of the node.
        The node with the name.
      • addNodeAuxiliaryInfo

        void addNodeAuxiliaryInfo​(SceneGraphNode node)
        Updates the string to node map and the star map if necessary.
        node - The node to add
      • removeNodeAuxiliaryInfo

        void removeNodeAuxiliaryInfo​(SceneGraphNode node)
        Removes the info of the node from the aux lists.
        node - The node to remove
      • getStarMap

        java.util.Map<java.lang.Integer,​IPosition> getStarMap()
        Gets a star map: HIP -> IPosition It only contains the stars with HIP number
        The HIP star map
      • getFocusableObjects

        com.badlogic.gdx.utils.Array<IFocus> getFocusableObjects()
      • findFocus

        IFocus findFocus​(java.lang.String name)
      • getSize

        int getSize()
      • getObjectPosition

        double[] getObjectPosition​(java.lang.String name,
                                   double[] out)
        Gets the current position of the object identified by the given name. The given position is in the internal reference system and corrects stars for proper motions and other objects for their specific motions as well.
        name - The name of the object
        out - The out double array
        The out double array if the object exists, has a position and out has 3 or more slots. Null otherwise.