Class Orbit

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, I3DTextRenderable, IGPUVertsRenderable, ILineRenderable, IRenderable, IStarContainer, IVisibilitySwitch, IPosition
Direct Known Subclasses:
EclipticOrbit, HeliotropicOrbit

public class Orbit extends Polyline implements I3DTextRenderable
A polyline that represents a closed orbit. Contains a reference to the body and some other goodies
  • Field Details

    • SOLID_ANGLE_THRESHOLD

      protected static float SOLID_ANGLE_THRESHOLD
      Threshold solid angle
    • SHADER_MODEL_OVERLAP_FACTOR

      protected static final float SHADER_MODEL_OVERLAP_FACTOR
      Special overlap factor
      See Also:
    • body

      protected CelestialBody body
    • prev

      protected Vector3d prev
    • curr

      protected Vector3d curr
    • alpha

      public double alpha
    • localTransformD

      public Matrix4d localTransformD
    • transformFunction

      public Matrix4d transformFunction
    • auxMat

      public Matrix4d auxMat
    • provider

      protected String provider
    • multiplier

      protected Double multiplier
    • providerClass

      protected Class<? extends IOrbitDataProvider> providerClass
    • oc

      public OrbitComponent oc
    • onlyBody

      protected boolean onlyBody
    • newMethod

      public boolean newMethod
    • coord

      public double coord
    • model

      public Orbit.OrientationModel model
    • isInOrbitalElementsGroup

      public boolean isInOrbitalElementsGroup
    • refreshing

      public boolean refreshing
      Refreshing state
    • numSamples

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

      public float[] pointColor
      Point color
    • pointSize

      public float pointSize
      Point size
  • Constructor Details

    • Orbit

      public Orbit()
  • Method Details

    • setSolidAngleThreshold

      public static void setSolidAngleThreshold(float angleDeg)
    • initialize

      public void initialize()
      Overrides:
      initialize in class SceneGraphNode
    • doneLoading

      public void doneLoading(com.badlogic.gdx.assets.AssetManager manager)
      Overrides:
      doneLoading in class SceneGraphNode
    • computeExtrasolarSystemTransformMatrix

      public void computeExtrasolarSystemTransformMatrix()
    • initializeTransformMatrix

      public void initializeTransformMatrix()
    • setPointCloudData

      public void setPointCloudData(PointCloudData pcd)
      Overrides:
      setPointCloudData in class VertsObject
    • initOrbitMetadata

      public void initOrbitMetadata()
    • updateLocal

      public void updateLocal(ITimeFrameProvider time, ICamera camera)
      Description copied from class: SceneGraphNode
      Updates the transform matrix with the transformations that will apply to the children and the local transform matrix with the transformations that will apply only to this object.
      Overrides:
      updateLocal in class SceneGraphNode
    • updateLocalTransform

      protected void updateLocalTransform(Instant date)
    • addToRenderLists

      protected void addToRenderLists(ICamera camera)
      Description copied from class: SceneGraphNode
      Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
      Overrides:
      addToRenderLists in class Polyline
    • text

      public String text()
      Description copied from interface: I3DTextRenderable
      Returns the text
      Specified by:
      text in interface I3DTextRenderable
      Returns:
      The text
    • textDepthBuffer

      public void textDepthBuffer()
      Description copied from interface: I3DTextRenderable
      Executes the blending for the text
      Specified by:
      textDepthBuffer in interface I3DTextRenderable
    • isLabel

      public boolean isLabel()
      Description copied from interface: I3DTextRenderable
      Is it a label or another kind of text?
      Specified by:
      isLabel in interface I3DTextRenderable
      Returns:
      Whether this is a label
    • getTextOpacity

      public float getTextOpacity()
      Description copied from interface: I3DTextRenderable
      Gets the text opacity
      Specified by:
      getTextOpacity in interface I3DTextRenderable
      Returns:
      Text opacity
    • labelMax

      public float labelMax()
    • textScale

      public float textScale()
      Description copied from interface: I3DTextRenderable
      Returns the text scale for the scale varying in the shader
      Specified by:
      textScale in interface I3DTextRenderable
      Returns:
      The scale
    • textSize

      public float textSize()
      Description copied from interface: I3DTextRenderable
      Returns the text size
      Specified by:
      textSize in interface I3DTextRenderable
      Returns:
      The text size
    • keplerToCartesian

      public Vector3d keplerToCartesian(Vector3d out)
    • textPosition

      public void textPosition(ICamera cam, Vector3d out)
      Description copied from interface: I3DTextRenderable
      Sets the position of this text in the out vector
      Specified by:
      textPosition in interface I3DTextRenderable
      out - The out parameter with the result
    • textPosition2

      public double textPosition2(ICamera cam, Vector3d out)
    • renderText

      public boolean renderText()
      Description copied from interface: I3DTextRenderable
      Tells whether the text must be rendered or not for this entity
      Specified by:
      renderText in interface I3DTextRenderable
      Returns:
      True if text must be rendered
    • render

      public void render(ExtSpriteBatch batch, ExtShaderProgram shader, FontRenderSystem sys, RenderingContext rc, ICamera camera)
      Render label
      Specified by:
      render in interface I3DTextRenderable
      Parameters:
      batch - The sprite batch
      shader - The shader
      sys - The font render system
      rc - The render context
      camera - The camera
    • textColour

      public float[] textColour()
      Description copied from interface: I3DTextRenderable
      Returns an array with the text colour in the fashion [r, g, b, a]
      Specified by:
      textColour in interface I3DTextRenderable
      Returns:
      Array with the colour
    • render

      public void render(LineRenderSystem renderer, ICamera camera, float alpha)
      Specified by:
      render in interface ILineRenderable
      Overrides:
      render in class Polyline
    • refreshOrbit

      public void refreshOrbit(boolean force)
    • setSize

      public void setSize(Float size)
      Sets the absolute size of this entity
    • setPointsize

      public void setPointsize(Long pointsize)
    • setPointsize

      public void setPointsize(Double pointsize)
    • setPointcolor

      public void setPointcolor(double[] color)
    • getProvider

      public String getProvider()
    • setProvider

      public void setProvider(String provider)
    • setOrbit

      public void setOrbit(OrbitComponent oc)
    • setTransformName

      public void setTransformName(String transformFunction)
    • setTransformFunction

      public void setTransformFunction(String transformFunction)
    • setTransformValues

      public void setTransformValues(double[] transformValues)
      Constructs the transformation matrix from a double array containing the values in a column-major order (first the four values of the first column, then the second, etc.). The double array must have at least 16 elements; the first 16 will be copied.
    • setMultiplier

      public void setMultiplier(Double multiplier)
    • setBody

      public void setBody(CelestialBody body)
    • setOnlybody

      public void setOnlybody(Boolean onlyBody)
    • setNewmethod

      public void setNewmethod(Boolean newMethod)
    • setTrail

      public void setTrail(Boolean trail)
    • setOrbittrail

      public void setOrbittrail(Boolean trail)
    • setNumSamples

      public void setNumSamples(Long numSamples)
    • setModel

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

      public double getAlpha()
      Specified by:
      getAlpha in interface IGPUVertsRenderable
      Overrides:
      getAlpha in class VertsObject
    • setVisible

      public void setVisible(boolean visible, String name)
      Specified by:
      setVisible in interface IVisibilitySwitch
      Overrides:
      setVisible in class SceneGraphNode
    • mustAddToIndex

      public boolean mustAddToIndex()
      Description copied from class: SceneGraphNode
      Whether to add this node to the index.
      Overrides:
      mustAddToIndex in class SceneGraphNode
      Returns:
      True if the node needs to be added to the index.