Class LabelView

All Implemented Interfaces:
I3DTextRenderable, IRenderable

public class LabelView extends RenderView implements I3DTextRenderable
  • Field Details

  • Constructor Details

    • LabelView

      public LabelView()
  • Method Details

    • entityCheck

      protected void entityCheck(com.badlogic.ashley.core.Entity entity)
      Description copied from class: AbstractView
      Checks whether the given entity is suitable for this view. This method should throw a RuntimeException if the entity is not suitable.
      Overrides:
      entityCheck in class BaseView
      Parameters:
      entity - The entity.
    • entityChanged

      protected void entityChanged()
      Description copied from class: AbstractView
      Contains actions to take after a new entity has been set. This method is typically used to initialize the view components.
      Overrides:
      entityChanged in class RenderView
    • entityCleared

      protected void entityCleared()
      Description copied from class: AbstractView
      This method is called when the entity of this view is cleared. It should set all component references to null.
      Overrides:
      entityCleared in class RenderView
    • renderTextCelestial

      public boolean renderTextCelestial()
    • renderTextParticle

      public boolean renderTextParticle()
    • renderTextLocation

      public boolean renderTextLocation()
    • renderTextKeyframe

      public boolean renderTextKeyframe()
    • renderTextRuler

      public boolean renderTextRuler()
    • renderTextBackgroundModel

      public boolean renderTextBackgroundModel()
    • renderTextTitle

      public boolean renderTextTitle()
    • renderTextTrajectory

      public boolean renderTextTrajectory()
    • renderTextGridRec

      public boolean renderTextGridRec()
    • renderTextEssential

      public boolean renderTextEssential()
    • renderTextBase

      public boolean renderTextBase()
    • 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)
      Description copied from interface: I3DTextRenderable
      Renders the text
      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
    • textSize

      public float textSize()
      Description copied from interface: I3DTextRenderable
      Returns the text size
      Specified by:
      textSize in interface I3DTextRenderable
      Returns:
      The text size
    • 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
    • textPosition

      public void textPosition(ICamera cam, Vector3d out)
      Text position for single objects (models, single stars, etc.).
      Specified by:
      textPosition in interface I3DTextRenderable
      Parameters:
      cam - The camera.
      out - The out parameter with the result.
    • 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
    • defaultTextDepthBuffer

      public void defaultTextDepthBuffer()
    • noTextDepthBuffer

      public void noTextDepthBuffer()
    • emptyTextDepthBuffer

      public void emptyTextDepthBuffer()
    • 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
    • render2DLabel

      protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, Vector3d pos3d)
    • render2DLabel

      protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale, int align)
    • render2DLabel

      protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y)
    • render2DLabel

      protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale)
    • render3DLabel

      protected void render3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3d pos, double distToCamera, float scale, double size, double radius, boolean forceLabel)
    • render3DLabel

      protected void render3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3d pos, double distToCamera, float scale, double size, double radius, float minSizeDegrees, float maxSizeDegrees, boolean forceLabel)