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
Updates entities within the scene graph, managing their hierarchical transformations.
-
Field Summary
Fields inherited from class com.badlogic.ashley.core.EntitySystem
priority -
Constructor Summary
ConstructorsConstructorDescriptionGraphUpdater(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 floatprotected longmsSinceStateChange(Base base) booleanmustUpdateLoc(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.booleanmustUpdatePerimeter(com.badlogic.ashley.core.Entity entity, GraphNode graph) This function quickly discards perimeters when the Countries component type is off.voidprintTree(com.badlogic.ashley.core.Entity entity, String tab, int level, AtomicInteger count) protected voidprocessEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) voidvoidupdate(com.badlogic.ashley.core.Entity entity, ITimeFrameProvider time, Vector3Q parentTranslation, float opacity) voidupdateEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) Updates the entity.voidupdatePositionDefault(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph) General method to update the position of an entity.voidupdatePositionLocationMark(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph) voidupdateShapeObject(com.badlogic.ashley.core.Entity entity, Body body, GraphNode graph) Method to update the position of a shape object.voidupdateSpacecraft(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, updateMethods inherited from class com.badlogic.ashley.core.EntitySystem
checkProcessing, getEngine, setProcessingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EntityUpdater
getFamilyModifier and TypeMethodDescriptioncom.badlogic.ashley.core.FamilyReturns the family for this updater.
-
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:
processEntityin classcom.badlogic.ashley.systems.IteratingSystem
-
updateEntity
public void updateEntity(com.badlogic.ashley.core.Entity entity, float deltaTime) Description copied from interface:EntityUpdaterUpdates 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, Vector3Q 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
-
updatePositionLocationMark
-
updateShapeObject
-
updateSpacecraft
-