Class Planet

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, I3DTextRenderable, IAtmosphereRenderable, ICloudRenderable, ILineRenderable, IModelRenderable, IQuadRenderable, IRenderable, IFocus, IStarContainer, IVisibilitySwitch, IPosition

public class Planet
extends ModelBody
implements IAtmosphereRenderable, ICloudRenderable, ILineRenderable
  • Constructor Details

    • Planet

      public Planet()
  • Method Details


      public double THRESHOLD_NONE()
      Description copied from class: CelestialBody
      radius/distance limit for rendering at all. If angle is smaller than this quantity, no rendering happens.
      Specified by:
      THRESHOLD_NONE in class CelestialBody

      public double THRESHOLD_POINT()
      Description copied from class: ModelBody
      Angle limit for rendering as point. If angle is any bigger, we render with shader.
      THRESHOLD_POINT in class ModelBody

      public double THRESHOLD_QUAD()
      Description copied from class: CelestialBody
      radius/distance limit for rendering as shader. If angle is any bigger, we render as a model.
      Specified by:
      THRESHOLD_QUAD in class CelestialBody
    • initialize

      public void initialize()
      initialize in class ModelBody
    • setColor2Data

      protected void setColor2Data()
      setColor2Data in class CelestialBody
    • doneLoading

      public void doneLoading​(com.badlogic.gdx.assets.AssetManager manager)
      doneLoading in class ModelBody
    • 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.
      updateLocal in class ModelBody
    • updateLocalTransform

      protected void updateLocalTransform()
      Description copied from class: ModelBody
      Update the local transform with the transform and the rotations/scales necessary. Override if your model contains more than just the position and size.
      updateLocalTransform in class ModelBody
    • updateLocalValues

      public void updateLocalValues​(ITimeFrameProvider time, ICamera camera)
      Description copied from class: SceneGraphNode
      This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.
      updateLocalValues in class SceneGraphNode
    • forceUpdateLocalValues

      protected void forceUpdateLocalValues​(ITimeFrameProvider time, boolean force)
    • render

      public void render​(IntModelBatch modelBatch, float alpha, double t, RenderingContext rc)
      Renders model
      Specified by:
      render in interface IModelRenderable
      render in class ModelBody
    • renderAtmosphere

      public void renderAtmosphere​(IntModelBatch modelBatch, float alpha, double t, Vector3d vrOffset)
      Renders the atmosphere
      Specified by:
      renderAtmosphere in interface IAtmosphereRenderable
      modelBatch - The model batch to use.
      alpha - The opacity.
      t - The time in seconds since the start.
      vrOffset - Positional offset in vr mode, if any.
    • renderClouds

      public void renderClouds​(IntModelBatch modelBatch, float alpha, double t)
      Renders the clouds
      Specified by:
      renderClouds in interface ICloudRenderable
      modelBatch - The model batch to use
      alpha - The opacity
      t - The time in seconds since the start
    • 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.
      addToRenderLists in class ModelBody
    • hasAtmosphere

      public boolean hasAtmosphere()
      Specified by:
      hasAtmosphere in interface IModelRenderable
      hasAtmosphere in class CelestialBody
    • setAtmosphere

      public void setAtmosphere​(AtmosphereComponent ac)
    • setCloud

      public void setCloud​(CloudComponent clc)
    • labelFactor

      protected float labelFactor()
      Specified by:
      labelFactor in class CelestialBody
    • dispose

      public void dispose()
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      dispose in class ModelBody
    • render

      public void render​(LineRenderSystem renderer, ICamera camera, float alpha)
      Specified by:
      render in interface ILineRenderable
    • getGlPrimitive

      public int getGlPrimitive()
      Specified by:
      getGlPrimitive in interface ILineRenderable
    • checkClickDistance

      protected boolean checkClickDistance​(int screenX, int screenY, com.badlogic.gdx.math.Vector3 pos, NaturalCamera camera, pcamera, double pixelSize)
      checkClickDistance in class CelestialBody
    • getLineWidth

      public float getLineWidth()
      Specified by:
      getLineWidth in interface ILineRenderable