Class GraphUpdater

java.lang.Object
com.badlogic.ashley.core.EntitySystem
com.badlogic.ashley.systems.IteratingSystem
gaiasky.scene.system.update.AbstractUpdateSystem
gaiasky.scene.system.update.GraphUpdater
All Implemented Interfaces:
EntityUpdater

public class GraphUpdater extends AbstractUpdateSystem
  • Field Summary Link icon

    Fields inherited from class com.badlogic.ashley.core.EntitySystem Link icon

    priority
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    GraphUpdater(com.badlogic.ashley.core.Family family, int priority, ITimeFrameProvider time)
    Instantiates a system that will iterate over the entities described by the Family.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    protected float
     
    protected long
     
    boolean
    mustUpdateLoc(com.badlogic.ashley.core.Entity entity, GraphNode graph)
    This function quickly discards locations when the Locations component type is off or when the solid angle of the parent is too small.
    boolean
    mustUpdatePerimeter(com.badlogic.ashley.core.Entity entity, GraphNode graph)
    This function quickly discards perimeters when the Countries component type is off.
    void
    printTree(com.badlogic.ashley.core.Entity entity, String tab, int level, AtomicInteger count)
     
    protected void
    processEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
     
    void
     
    void
    update(com.badlogic.ashley.core.Entity entity, ITimeFrameProvider time, Vector3b parentTranslation, float opacity)
     
    void
    updateEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
    Updates the entity.
    void
    updatePositionDefault(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
    General method to update the position of an entity.
    void
    updatePositionLocationMark(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
     
    void
    updateShapeObject(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
    Method to update the position of a shape object.
    void
    updateSpacecraft(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
    Method to update the position of a spacecraft.

    Methods inherited from class com.badlogic.ashley.systems.IteratingSystem Link icon

    addedToEngine, getEntities, getFamily, removedFromEngine, update

    Methods inherited from class com.badlogic.ashley.core.EntitySystem Link icon

    checkProcessing, getEngine, setProcessing

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface gaiasky.scene.system.update.EntityUpdater Link icon

    getFamily
  • Constructor Details Link icon

    • GraphUpdater Link icon

      public GraphUpdater(com.badlogic.ashley.core.Family family, int priority, ITimeFrameProvider time)
      Instantiates a system that will iterate over the entities described by the Family.
      Parameters:
      family - The family of entities iterated over in this System. In this case, it should be just one (GraphRoot.
  • Method Details Link icon

    • setCamera Link icon

      public void setCamera(ICamera camera)
    • processEntity Link icon

      protected void processEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
      Specified by:
      processEntity in class com.badlogic.ashley.systems.IteratingSystem
    • updateEntity Link icon

      public void updateEntity(com.badlogic.ashley.core.Entity entity, float deltaTime)
      Description copied from interface: EntityUpdater
      Updates the entity.
      Parameters:
      entity - The entity to update.
      deltaTime - The delta time since last frame.
    • printTree Link icon

      public void printTree(com.badlogic.ashley.core.Entity entity, String tab, int level, AtomicInteger count)
    • update Link icon

      public void update(com.badlogic.ashley.core.Entity entity, ITimeFrameProvider time, Vector3b parentTranslation, float opacity)
    • getVisibilityOpacityFactor Link icon

      protected float getVisibilityOpacityFactor(Base base)
    • msSinceStateChange Link icon

      protected long msSinceStateChange(Base base)
    • mustUpdatePerimeter Link icon

      public boolean mustUpdatePerimeter(com.badlogic.ashley.core.Entity entity, GraphNode graph)
      This function quickly discards perimeters when the Countries component type is off.
      Parameters:
      entity - The entity.
      graph - The graph component.
      Returns:
      Whether the perimeter must be processed.
    • mustUpdateLoc Link icon

      public boolean mustUpdateLoc(com.badlogic.ashley.core.Entity entity, GraphNode graph)
      This function quickly discards locations when the Locations component type is off or when the solid angle of the parent is too small.
      Parameters:
      entity - The entity.
      graph - The graph component.
      Returns:
      Whether the perimeter must be processed.
    • updatePositionDefault Link icon

      public void updatePositionDefault(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
      General method to update the position of an entity.
      Parameters:
      entity - The entity to update.
      body - The body component.
      graph - The graph component.
    • updatePositionLocationMark Link icon

      public void updatePositionLocationMark(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
    • updateShapeObject Link icon

      public void updateShapeObject(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
      Method to update the position of a shape object.
      Parameters:
      entity - The entity to update.
      body - The body component.
      graph - The graph component.
    • updateSpacecraft Link icon

      public void updateSpacecraft(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph)
      Method to update the position of a spacecraft.
      Parameters:
      entity - The entity to update.
      body - The body component.
      graph - The graph component.