Package gaiasky.scene.entity
Class EntityUtils
java.lang.Object
gaiasky.scene.entity.EntityUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Prepares the blending OpenGL state given aVerts
component.static void
Prepares the depth test OpenGL state given anVerts
component.static Vector3b
getAbsolutePosition
(com.badlogic.ashley.core.Entity entity, Vector3b out) Returns the absolute position of this entity in the internal reference system and internal units.static Vector3b
getAbsolutePosition
(com.badlogic.ashley.core.Entity entity, String name, Vector3b out) Returns the absolute position of the entity identified by the given name within this entity in the native coordinates (equatorial system) and internal units.static CatalogInfo
getDatasetAncestor
(com.badlogic.ashley.core.Entity entity) Gets the first dataset ancestor of this entity.static com.badlogic.ashley.core.Entity
getParticleSet
(Scene scene, String name, String file, List<IParticleRecord> data, DatasetOptions datasetOptions, boolean addToCatalogManager) static double
getRadius
(com.badlogic.ashley.core.Entity entity) Re-implementation ofFocusView.getRadius()
in a static context.static com.badlogic.ashley.core.Entity
getStarSet
(Scene scene, String name, String file, List<IParticleRecord> data, DatasetOptions datasetOptions, boolean addToCatalogManager) static boolean
isCoordinatesTimeOverflow
(com.badlogic.ashley.core.Entity entity) Checks whether the given entity has aCoordinates
component, and the current time is out of range.static boolean
isVisibilityOn
(com.badlogic.ashley.core.Entity entity) static void
setColor2Data
(Body body, Celestial celestial, float plus) Sets the pale color of this body.
-
Constructor Details
-
EntityUtils
public EntityUtils()
-
-
Method Details
-
getAbsolutePosition
Returns the absolute position of this entity in the internal reference system and internal units.- Parameters:
entity
- The entity.out
- Auxiliary vector to put the result in.- Returns:
- The vector with the position.
-
getAbsolutePosition
public static Vector3b getAbsolutePosition(com.badlogic.ashley.core.Entity entity, String name, Vector3b out) Returns the absolute position of the entity identified by the given name within this entity in the native coordinates (equatorial system) and internal units.- Parameters:
entity
- The entity.name
- The name.out
- Auxiliary vector to put the result in.- Returns:
- The vector with the position.
-
isCoordinatesTimeOverflow
public static boolean isCoordinatesTimeOverflow(com.badlogic.ashley.core.Entity entity) Checks whether the given entity has aCoordinates
component, and the current time is out of range.- Returns:
- Whether the entity is in time overflow.
-
blend
Prepares the blending OpenGL state given aVerts
component.- Parameters:
verts
- The verts component.
-
depth
Prepares the depth test OpenGL state given anVerts
component.- Parameters:
verts
- The verts component.
-
setColor2Data
Sets the pale color of this body.- Parameters:
body
- The body component.celestial
- The celestial component.plus
- The addition.
-
getParticleSet
public static com.badlogic.ashley.core.Entity getParticleSet(Scene scene, String name, String file, List<IParticleRecord> data, DatasetOptions datasetOptions, boolean addToCatalogManager) -
getStarSet
public static com.badlogic.ashley.core.Entity getStarSet(Scene scene, String name, String file, List<IParticleRecord> data, DatasetOptions datasetOptions, boolean addToCatalogManager) -
isVisibilityOn
public static boolean isVisibilityOn(com.badlogic.ashley.core.Entity entity) -
getRadius
public static double getRadius(com.badlogic.ashley.core.Entity entity) Re-implementation ofFocusView.getRadius()
in a static context.- Parameters:
entity
- The entity.- Returns:
- The radius of the entity.
-
getDatasetAncestor
Gets the first dataset ancestor of this entity.- Parameters:
entity
- The entity.- Returns:
- The catalog info.
-