Class LineView

All Implemented Interfaces:
ILineRenderable, IRenderable

public class LineView extends BaseView implements ILineRenderable
An entity view that implements the ILineRenderable methods.
  • Field Details

  • Constructor Details

    • LineView

      public LineView()
      Creates an empty line view.
    • LineView

      public LineView(com.badlogic.ashley.core.Entity entity)
      Creates an abstract view with the given entity.
      Parameters:
      entity - The 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
    • getLineWidth

      public float getLineWidth()
      Specified by:
      getLineWidth in interface ILineRenderable
    • 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
    • getComponentType

      public ComponentTypes getComponentType()
      Description copied from interface: IRenderable
      Gets the component types of this entity
      Specified by:
      getComponentType in interface IRenderable
      Returns:
      The component types
    • 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