Package gaiasky.scene.component
Class Trajectory
java.lang.Object
gaiasky.scene.component.Trajectory
- All Implemented Interfaces:
com.badlogic.ashley.core.Component
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptiondouble
com.badlogic.ashley.core.Entity
boolean
Whether to close the trajectory (connect end point to start point) or notdouble
float
Orbits with a body fade out as the camera get closer to the body.float
Orbits with a body fade out as the camera get closer to the body.boolean
static final Logger.Log
boolean
Whether the orbit must be refreshed when out of boundsboolean
int
Number of samples for the orbit data provider.boolean
long
long
boolean
Whether to show the orbit as a trail or not.float[]
Point colorfloat
Point sizeClass<? extends IOrbitDataProvider>
boolean
Refreshing statefloat
The bottom mapping position for the trail.float
Minimum opacity value of the trail. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setBody
(com.badlogic.ashley.core.Entity entity, double radius) void
setBody
(com.badlogic.ashley.core.Entity entity, double radius, float distDown, float distUp) void
setClosedLoop
(Boolean closedLoop) void
setFadeDistanceDown
(Double distDown) void
setFadeDistanceUp
(Double distUp) void
void
setMultiplier
(Double multiplier) void
setNewmethod
(Boolean newMethod) void
setNumSamples
(Long numSamples) void
setOnlybody
(Boolean onlyBody) void
void
setOrbitProvider
(String provider) void
setOrbittrail
(Boolean trail) void
setOrientationModel
(String model) Sets the orientation model as a string.void
setPointcolor
(double[] color) void
setPointColor
(double[] color) void
setPointsize
(Double pointSize) void
setPointsize
(Long pointSize) void
setPointSize
(Double pointSize) void
setPointSize
(Long pointSize) void
setProvider
(String provider) void
void
setTrailMap
(Double trailMap) void
setTrailMinOpacity
(Double trailMin)
-
Field Details
-
logger
-
body
public com.badlogic.ashley.core.Entity body -
curr
-
alpha
public double alpha -
localTransformD
-
provider
-
multiplier
-
providerClass
-
providerInstance
-
oc
-
onlyBody
public boolean onlyBody -
newMethod
public boolean newMethod -
coord
public double coord -
model
-
isInOrbitalElementsGroup
public boolean isInOrbitalElementsGroup -
refreshing
public boolean refreshingRefreshing state -
numSamples
public int numSamplesNumber of samples for the orbit data provider. -
orbitStartMs
public long orbitStartMs -
orbitEndMs
public long orbitEndMs -
mustRefresh
public boolean mustRefreshWhether the orbit must be refreshed when out of bounds -
closedLoop
public boolean closedLoopWhether to close the trajectory (connect end point to start point) or not -
orbitTrail
public boolean orbitTrailWhether to show the orbit as a trail or not. A trail fades the orbit line as it gets further away from the object. -
trailMap
public float trailMapThe bottom mapping position for the trail. The orbit trail assigns an opacity value to each point of the orbit, where 1 is the location of the object and 0 is the other end. This mapping parameter defines the location in the orbit (in [0,1]) where we map the opacity value of 0. Set to 0 to have a full trail. Set to 0.5 to have a trail that spans half the orbit. Set to 1 to have no orbit at all. -
trailMinOpacity
public float trailMinOpacityMinimum opacity value of the trail. Set this > 0 to raise the global opacity level of the orbit. Effectively, the opacity of the orbit will be mapped from this value to 1. -
params
-
pointColor
public float[] pointColorPoint color -
pointSize
public float pointSizePoint size -
distUp
public float distUpOrbits with a body fade out as the camera get closer to the body. This is the far distance, in body radius units, where the orbit starts the fade (mapped to 1). This attribute only has effect if this trajectory has a body. -
distDown
public float distDownOrbits with a body fade out as the camera get closer to the body. This is the near distance, in body radius units, where the orbit ends the fade (mapped to 0). This attribute only has effect if this trajectory has a body.
-
-
Constructor Details
-
Trajectory
public Trajectory()
-
-
Method Details
-
setOrientationModel
Sets the orientation model as a string.- Parameters:
model
- The orientation model.
-
setModel
-
setPointSize
-
setPointsize
-
setPointSize
-
setPointsize
-
setPointColor
public void setPointColor(double[] color) -
setPointcolor
public void setPointcolor(double[] color) -
setClosedLoop
-
setOrbitProvider
-
setProvider
-
setOrbit
-
setMultiplier
-
setOnlybody
-
setNewmethod
-
setTrail
-
setTrailMap
-
setTrailMinOpacity
-
setOrbittrail
-
setNumSamples
-
setFadeDistanceUp
-
setFadeDistanceDown
-
setBody
public void setBody(com.badlogic.ashley.core.Entity entity, double radius) -
setBody
public void setBody(com.badlogic.ashley.core.Entity entity, double radius, float distDown, float distUp)
-