Package gaiasky.scene.system.update
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
-
Field Summary
Fields inherited from class com.badlogic.ashley.core.EntitySystem
priority
-
Constructor Summary
ConstructorDescriptionGraphUpdater
(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
Modifier and TypeMethodDescriptionprotected float
protected long
msSinceStateChange
(Base base) 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
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
addedToEngine, getEntities, getFamily, removedFromEngine, update
Methods inherited from class com.badlogic.ashley.core.EntitySystem
checkProcessing, getEngine, setProcessing
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gaiasky.scene.system.update.EntityUpdater
getFamily
-
Constructor Details
-
GraphUpdater
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
-
setCamera
-
processEntity
protected void processEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) - Specified by:
processEntity
in classcom.badlogic.ashley.systems.IteratingSystem
-
updateEntity
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
public void printTree(com.badlogic.ashley.core.Entity entity, String tab, int level, AtomicInteger count) -
update
public void update(com.badlogic.ashley.core.Entity entity, ITimeFrameProvider time, Vector3b parentTranslation, float opacity) -
getVisibilityOpacityFactor
-
msSinceStateChange
-
mustUpdatePerimeter
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
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
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.
-
updateShapeObject
Method to update the position of a shape object.- Parameters:
entity
- The entity to update.body
- The body component.graph
- The graph component.
-
updateSpacecraft
Method to update the position of a spacecraft.- Parameters:
entity
- The entity to update.body
- The body component.graph
- The graph component.
-