Package heronarts.lx.output
Class IndexBuffer
java.lang.Object
heronarts.lx.output.IndexBuffer
An IndexBuffer is a representation of all the pixels that an output packet will
send. It can be comprised of multiple segments at various offsets, each of which
may have its own byte ordering. The segments are not required to be strictly ordered
or continuous, there may be gaps in the buffer (for instance DMX channels 1-10 may
be send along with channels 30-40, leaving the space between blank).
Each segment itself is continuous, specifying the indices into the master color buffer
that are to be sent, along with their byte ordering.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Placeholder value that can be used in index buffers to output an empty pixel with all byte values of 0, rather than a value from the colors array.final int
The total number of single-byte DMX channels required by this index buffer to fit all of the data it containsfinal IndexBuffer.Segment[]
All of the segments in this index buffer -
Constructor Summary
ConstructorsConstructorDescriptionIndexBuffer
(int[] indices) Makes an IndexBuffer with a single segment, RGB with offset 0IndexBuffer
(int[] indices, LXBufferOutput.ByteOrder byteOrder) Makes an IndexBuffer with a single segment, given indices and byte order, at offset 0IndexBuffer
(int[] indices, LXBufferOutput.ByteOrder byteOrder, int channel) Makes a single-semgent IndexBuffer with specified indices, byte ordering and channel offsetIndexBuffer
(int[] indices, LXBufferOutput.ByteOrder byteOrder, int channel, LXParameter brightness) Makes a single-semgent IndexBuffer with specified indices, byte ordering and channel offsetIndexBuffer
(IndexBuffer.Segment... segments) Makes an IndexBuffer with the given list of segments.IndexBuffer
(List<IndexBuffer.Segment> segments) Makes an IndexBuffer with the given list of segments. -
Method Summary
-
Field Details
-
EMPTY_PIXEL
public static final int EMPTY_PIXELPlaceholder value that can be used in index buffers to output an empty pixel with all byte values of 0, rather than a value from the colors array.- See Also:
-
segments
All of the segments in this index buffer -
numChannels
public final int numChannelsThe total number of single-byte DMX channels required by this index buffer to fit all of the data it contains
-
-
Constructor Details
-
IndexBuffer
public IndexBuffer(int[] indices) Makes an IndexBuffer with a single segment, RGB with offset 0- Parameters:
indices
- Indices for segment
-
IndexBuffer
Makes an IndexBuffer with a single segment, given indices and byte order, at offset 0- Parameters:
indices
- Indices for single segmentbyteOrder
- Byte order
-
IndexBuffer
Makes a single-semgent IndexBuffer with specified indices, byte ordering and channel offset- Parameters:
indices
- Array of indices into master color bufferbyteOrder
- Byte ordering to sendchannel
- Channel offset in the output packet
-
IndexBuffer
public IndexBuffer(int[] indices, LXBufferOutput.ByteOrder byteOrder, int channel, LXParameter brightness) Makes a single-semgent IndexBuffer with specified indices, byte ordering and channel offset- Parameters:
indices
- Array of indices into master color bufferbyteOrder
- Byte ordering to sendchannel
- Channel offset in the output packetbrightness
- Brightness for the output packet
-
IndexBuffer
Makes an IndexBuffer with the given list of segments.- Parameters:
segments
- Segments to include in index buffer
-
IndexBuffer
Makes an IndexBuffer with the given list of segments.- Parameters:
segments
- Segments to include in index buffer
-