Class Planet

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

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

    • Planet

      public Planet()
  • Method Details

    • THRESHOLD_NONE

      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
    • THRESHOLD_POINT

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

      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()
      Overrides:
      initialize in class ModelBody
    • setColor2Data

      protected void setColor2Data()
      Overrides:
      setColor2Data in class CelestialBody
    • doneLoading

      public void doneLoading​(com.badlogic.gdx.assets.AssetManager manager)
      Overrides:
      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.
      Overrides:
      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.
      Overrides:
      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.
      Overrides:
      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
      Overrides:
      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
      Parameters:
      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
      Parameters:
      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.
      Overrides:
      addToRenderLists in class ModelBody
    • hasAtmosphere

      public boolean hasAtmosphere()
      Specified by:
      hasAtmosphere in interface IModelRenderable
      Overrides:
      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
      Overrides:
      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, com.badlogic.gdx.graphics.PerspectiveCamera pcamera, double pixelSize)
      Overrides:
      checkClickDistance in class CelestialBody
    • getLineWidth

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