Class Trajectory

java.lang.Object
gaiasky.scene.component.Trajectory
All Implemented Interfaces:
com.badlogic.ashley.core.Component

public class Trajectory extends Object implements com.badlogic.ashley.core.Component
  • Field Details

    • logger

      public static final Logger.Log logger
    • body

      public com.badlogic.ashley.core.Entity body
    • curr

      public Vector3d curr
    • alpha

      public double alpha
    • localTransformD

      public Matrix4d localTransformD
    • provider

      public String provider
    • multiplier

      public Double multiplier
    • providerClass

      public Class<? extends IOrbitDataProvider> providerClass
    • providerInstance

      public IOrbitDataProvider providerInstance
    • oc

      public OrbitComponent oc
    • bodyRepresentation

      public Trajectory.OrbitBodyRepresentation bodyRepresentation
      Control the body/trajectory representation for this object. Note that the body can only be represented when using orbital elements.
    • newMethod

      public boolean newMethod
      Changes the way in which transformations are applied to the orbit objects. Asteroids have this set to true.
    • coord

      public double coord
    • model

    • isInOrbitalElementsGroup

      public boolean isInOrbitalElementsGroup
    • refreshing

      public boolean refreshing
      Refreshing state
    • numSamples

      public int numSamples
      Number of samples for the orbit data provider.
    • orbitStartMs

      public long orbitStartMs
    • orbitEndMs

      public long orbitEndMs
    • mustRefresh

      public boolean mustRefresh
      Whether the orbit must be refreshed when out of bounds
    • closedLoop

      public boolean closedLoop
      Whether to close the trajectory (connect end point to start point) or not
    • orbitTrail

      public boolean orbitTrail
      Whether 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 trailMap
      The 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 trailMinOpacity
      Minimum 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

    • bodyColor

      public float[] bodyColor
      Body color. Color to use to represent the body in orbital elements trajectories, when the bodyRepresentation attribute enables the representation of the body for this trajectory.
    • pointSize

      public float pointSize
      Point size
    • distUp

      public float distUp
      Orbits 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 distDown
      Orbits 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

      public void setOrientationModel(String model)
      Sets the orientation model as a string.
      Parameters:
      model - The orientation model.
    • setModel

      public void setModel(String model)
    • setPointSize

      public void setPointSize(Long pointSize)
    • setPointsize

      public void setPointsize(Long pointSize)
    • setPointSize

      public void setPointSize(Double pointSize)
    • setPointsize

      public void setPointsize(Double pointSize)
    • setBodyColor

      public void setBodyColor(double[] color)
    • setPointColor

      public void setPointColor(double[] color)
    • setPointcolor

      public void setPointcolor(double[] color)
    • setClosedLoop

      public void setClosedLoop(Boolean closedLoop)
    • setOrbitProvider

      public void setOrbitProvider(String provider)
    • setProvider

      public void setProvider(String provider)
    • setOrbit

      public void setOrbit(OrbitComponent oc)
    • setMultiplier

      public void setMultiplier(Double multiplier)
    • setOnlyBody

      public void setOnlyBody(Boolean onlyBody)
      Deprecated.
      Mutes the orbit line in orbital elements trajectories.
      Parameters:
      onlyBody - Whether to display only the body for this trajectory.
    • setOnlybody

      public void setOnlybody(Boolean onlyBody)
      Deprecated.
      Alias method, @see setOnlyBody(Boolean).
    • isOnlyBody

      public boolean isOnlyBody()
    • setBodyRepresentation

      public void setBodyRepresentation(String representation)
      Sets the body representation for this trajectory.
      Parameters:
      representation - The body representation model. See Trajectory.OrbitBodyRepresentation for more information.
    • setNewmethod

      public void setNewmethod(Boolean newMethod)
    • setTrail

      public void setTrail(Boolean trail)
    • setTrailMap

      public void setTrailMap(Double trailMap)
    • setTrailMinOpacity

      public void setTrailMinOpacity(Double trailMin)
    • setOrbittrail

      public void setOrbittrail(Boolean trail)
    • setNumSamples

      public void setNumSamples(Long numSamples)
    • setFadeDistanceUp

      public void setFadeDistanceUp(Double distUp)
    • setFadeDistanceDown

      public void setFadeDistanceDown(Double distDown)
    • 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)