Class RenderView

All Implemented Interfaces:
IRenderable
Direct Known Subclasses:
LabelView, PointView

public class RenderView extends BaseView implements IRenderable
View of an entity for rendering purposes. Adds particle extra, particle set, and star set cached components to whatever is in base view.
  • Field Details

    • extra

      public ParticleExtra extra
      Particle component, maybe.
    • particleSet

      public ParticleSet particleSet
      Particle set component
    • starSet

      public StarSet starSet
      Star set component
  • Constructor Details

    • RenderView

      public RenderView()
    • RenderView

      public RenderView(com.badlogic.ashley.core.Entity entity)
  • Method Details

    • 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 BaseView
    • 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 BaseView
    • getDistToCamera

      public double getDistToCamera()
      Description copied from interface: IRenderable
      Gets the last distance to the camera calculated for this entity
      Specified by:
      getDistToCamera in interface IRenderable
      Returns:
      The distance
    • getOpacity

      public float getOpacity()
      Description copied from interface: IRenderable
      Returns the opacity of this renderable
      Specified by:
      getOpacity in interface IRenderable
      Overrides:
      getOpacity in class BaseView
      Returns:
      The opacity
    • getRadius

      public double getRadius()
    • textColour

      public float[] textColour()
      Text color for single objects
    • textColour

      public float[] textColour(String name)
      Text color for the star with the given name in a star set.