Class IndexBuffer.Segment

java.lang.Object
heronarts.lx.output.IndexBuffer.Segment
Enclosing class:
IndexBuffer

public static class IndexBuffer.Segment extends Object
A Segment is a continous portion of an index buffer which specifies the indices into the final color buffer which are to be sent, along with the byte ordering.
  • Field Details

    • indices

      public final int[] indices
      Globally indexed buffer of point indices in this segment, relative to master color buffer.
    • byteEncoder

      public final LXBufferOutput.ByteEncoder byteEncoder
      Byte order to use when sending the points in this segment, which implicitly specifies how many bytes are used per pixel
    • startChannel

      public final int startChannel
      Starting channel in output packet for this segment (e.g. ArtNet channel)
    • endChannel

      public final int endChannel
      End channel (inclusive) for this segment
    • byteLength

      public final int byteLength
      Total length of this segment in bytes, which is a function of both the number of points and the byte ordering.
    • brightness

      public final LXParameter brightness
      Parameter to track the brightness level of this segment
  • Constructor Details

    • Segment

      public Segment(int[] indices)
      Default RGB segment for a given set of indices at offset 0
      Parameters:
      indices - Point indices for this segment
    • Segment

      public Segment(int[] indices, LXBufferOutput.ByteEncoder byteEncoder)
      Segment with specified indices and byte ordering
      Parameters:
      indices - Array of indices into master color buffer
      byteEncoder - Byte encoder to use when sending
    • Segment

      public Segment(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel)
      Segment with specified indices, byte ordering and channel offset
      Parameters:
      indices - Array of indices into master color buffer
      byteEncoder - Byte encoder to use when sending send
      channel - Channel offset in the output packet
    • Segment

      public Segment(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel, LXParameter brightness)
      Segment with specified indices, byte ordering and channel offset
      Parameters:
      indices - Array of indices into master color buffer
      byteEncoder - Byte encoder to send
      channel - Channel offset in the output packet
      brightness - Brightness of this segment