Class PointCloudRenderer

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IObserver, IRenderSystem
Direct Known Subclasses:
ParticleSetPointRenderer

public abstract class PointCloudRenderer extends ImmediateModeRenderSystem implements IObserver
Contains some common code to all point cloud renderers and some scaffolding to make life easier. Should be used by point clouds that render their particles as GL_POINTS.
  • Constructor Details

  • Method Details

    • initVertices

      protected void initVertices()
      Specified by:
      initVertices in class ImmediateModeRenderSystem
    • addVertexAttributes

      protected abstract void addVertexAttributes(com.badlogic.gdx.utils.Array<com.badlogic.gdx.graphics.VertexAttribute> attributes)
      Adds the required vertex attributes for this renderer to the given list
      Parameters:
      attributes - The list of attributes
    • buildVertexAttributes

      protected com.badlogic.gdx.graphics.VertexAttribute[] buildVertexAttributes()
      Builds the vertex attributes array and returns it
      Returns:
      The vertex attributes array
    • offsets

      protected abstract void offsets(ImmediateModeRenderSystem.MeshData curr)
      Computes the offset for each vertex attribute. The offsets will be used later in the render stage.
      Parameters:
      curr - The current mesh data
    • addMeshData

      protected int addMeshData(int maxVerts)
      Adds a new mesh data to the meshes list and increases the mesh data index
      Parameters:
      maxVerts - The max number of vertices this mesh data can hold
      Returns:
      The index of the new mesh data
    • addMeshData

      protected int addMeshData(int maxVerts, int maxIndices)
      Adds a new mesh data to the meshes list and increases the mesh data index
      Parameters:
      maxVerts - The max number of vertices this mesh data can hold
      maxIndices - The maximum number of indices this mesh data can hold
      Returns:
      The index of the new mesh data
    • preRenderObjects

      protected void preRenderObjects(ExtShaderProgram shaderProgram, ICamera camera)
    • renderObject

      protected void renderObject(ExtShaderProgram shaderProgram, IRenderable renderable)
    • postRenderObjects

      protected void postRenderObjects(ExtShaderProgram shaderProgram, ICamera camera)
    • renderStud

      public void renderStud(List<IRenderable> renderables, ICamera camera, double t)
      Specified by:
      renderStud in class AbstractRenderSystem