Class VertsView

All Implemented Interfaces:
IGPUVertsRenderable, IRenderable

public class VertsView extends BaseView implements IGPUVertsRenderable
  • Constructor Details

    • VertsView

      public VertsView()
    • VertsView

      public VertsView(com.badlogic.ashley.core.Entity entity)
  • 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 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
    • markForUpdate

      public void markForUpdate()
      Specified by:
      markForUpdate in interface IGPUVertsRenderable
    • getPointCloud

      public PointCloudData getPointCloud()
      Specified by:
      getPointCloud in interface IGPUVertsRenderable
    • getColor

      public float[] getColor()
      Specified by:
      getColor in interface IGPUVertsRenderable
    • getAlpha

      public double getAlpha()
      Specified by:
      getAlpha in interface IGPUVertsRenderable
    • getLocalTransform

      public com.badlogic.gdx.math.Matrix4 getLocalTransform()
      Specified by:
      getLocalTransform in interface IGPUVertsRenderable
    • getParentEntity

      public com.badlogic.ashley.core.Entity getParentEntity()
      Specified by:
      getParentEntity in interface IGPUVertsRenderable
    • isClosedLoop

      public boolean isClosedLoop()
      Specified by:
      isClosedLoop in interface IGPUVertsRenderable
    • setClosedLoop

      public void setClosedLoop(boolean closedLoop)
      Specified by:
      setClosedLoop in interface IGPUVertsRenderable
    • blend

      public void blend()
      Specified by:
      blend in interface IGPUVertsRenderable
    • depth

      public void depth()
      Specified by:
      depth in interface IGPUVertsRenderable
    • getGlPrimitive

      public int getGlPrimitive()
      Specified by:
      getGlPrimitive in interface IGPUVertsRenderable
    • setGlPrimitive

      public void setGlPrimitive(int glPrimitive)
    • getPrimitiveSize

      public float getPrimitiveSize()
      Specified by:
      getPrimitiveSize in interface IGPUVertsRenderable
    • setPrimitiveSize

      public void setPrimitiveSize(float size)
      Description copied from interface: IGPUVertsRenderable
      Line width for lines, point size for points
      Specified by:
      setPrimitiveSize in interface IGPUVertsRenderable
      Parameters:
      size - The size
    • 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
    • setPoints

      public void setPoints(double[] points)
      Sets the 3D points of the line in the internal reference system.
      Parameters:
      points - Vector with the points. If length is not multiple of 3, some points are discarded.
    • addPoints

      public void addPoints(double[] points)
      Adds the given points to this data
      Parameters:
      points - The points to add
    • addPoint

      public void addPoint(Vector3d point)
      Adds the given point ot this data
      Parameters:
      point - The point to add
    • setRenderGroup

      public void setRenderGroup(RenderGroup renderGroup)
    • isEmpty

      public boolean isEmpty()
      Description copied from class: AbstractView
      Checks whether an entity is set in this view. Note that an entity may be set, but the entity may have been removed from the engine. In that case, the entity is no longer valid. Use AbstractView.isValid().
      Overrides:
      isEmpty in class AbstractView
      Returns:
      True if an entity is not set. False otherwise.
    • clear

      public void clear()
      Clears the data from this object, both in RAM and VRAM