Class VertsObject

java.lang.Object
gaiasky.scenegraph.SceneGraphNode
gaiasky.scenegraph.VertsObject
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, IGPUVertsRenderable, IRenderable, IStarContainer, IVisibilitySwitch, IPosition
Direct Known Subclasses:
KeyframesPathObject, Points, Polyline

public class VertsObject extends SceneGraphNode implements IGPUVertsRenderable
Represents a group of vertices which are sent to the GPU in a VBO
  • Field Details

    • inGpu

      protected boolean inGpu
      GPU rendering attributes
    • offset

      protected int offset
      Indicates the index of the mesh data in the renderer
    • count

      protected int count
    • blend

      protected boolean blend
    • depth

      protected boolean depth
    • additive

      protected boolean additive
    • glPrimitive

      protected int glPrimitive
    • renderGroup

      protected SceneGraphRenderer.RenderGroup renderGroup
      The render group
    • closedLoop

      protected boolean closedLoop
      Whether to close the polyline (connect end point to start point) or not
    • primitiveSize

      protected float primitiveSize
    • pointCloudData

      protected PointCloudData pointCloudData
  • Constructor Details

  • Method Details

    • addToRenderLists

      protected void addToRenderLists(ICamera camera)
      Description copied from class: SceneGraphNode
      Adds this entity to the necessary render lists after the distance to the camera and the view angle have been determined.
      Overrides:
      addToRenderLists in class SceneGraphNode
    • updateLocalValues

      public void updateLocalValues(ITimeFrameProvider time, ICamera camera)
      Description copied from class: SceneGraphNode
      This function updates all the local values before the localTransform is updated. Position, rotations and scale must be updated in here.
      Overrides:
      updateLocalValues in class SceneGraphNode
    • 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
    • isEmpty

      public boolean isEmpty()
    • clear

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

      public boolean inGpu()
      Specified by:
      inGpu in interface IGPUVertsRenderable
    • getOffset

      public int getOffset()
      Specified by:
      getOffset in interface IGPUVertsRenderable
    • getCount

      public int getCount()
      Specified by:
      getCount in interface IGPUVertsRenderable
    • setPointCloudData

      public void setPointCloudData(PointCloudData pcd)
    • getPointCloud

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

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

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

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

      public SceneGraphNode getParent()
      Specified by:
      getParent in interface IGPUVertsRenderable
    • setInGpu

      public void setInGpu(boolean inGpu)
      Specified by:
      setInGpu in interface IGPUVertsRenderable
    • setOffset

      public void setOffset(int offset)
      Specified by:
      setOffset in interface IGPUVertsRenderable
    • setCount

      public void setCount(int count)
      Specified by:
      setCount in interface IGPUVertsRenderable
    • setPrimitiveSize

      public void setPrimitiveSize(float lineWidth)
      Description copied from interface: IGPUVertsRenderable
      Line width for lines, point size for points
      Specified by:
      setPrimitiveSize in interface IGPUVertsRenderable
      Parameters:
      lineWidth - The size
    • getPrimitiveSize

      public float getPrimitiveSize()
      Specified by:
      getPrimitiveSize 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
    • setBlend

      public void setBlend(boolean blend)
    • setAdditive

      public void setAdditive(boolean additive)
    • setDepth

      public void setDepth(boolean depth)
    • blend

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

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

      public void setGlPrimitive(int glPrimitive)
    • getGlPrimitive

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

      public void setPrimitiveLineStip()
    • setPrimitiveLines

      public void setPrimitiveLines()
    • setPrimitiveLineLoop

      public void setPrimitiveLineLoop()
    • setPrimitivePoints

      public void setPrimitivePoints()
    • markForUpdate

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

      public boolean isLine()
    • isPoint

      public boolean isPoint()