Package heronarts.lx.output
Class IndexBuffer.Segment
java.lang.Object
heronarts.lx.output.IndexBuffer.Segment
- Enclosing class:
IndexBuffer
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 TypeFieldDescriptionfinal LXParameter
Parameter to track the brightness level of this segmentByte order to use when sending the points in this segment, which implicitly specifies how many bytes are used per pixelfinal int[]
Globally indexed buffer of point indices in this segment, relative to master color buffer.final int
How many bytes spacing is placed between each pixel value, typically this is byteEncoder.numBytes() but may be specified largerfinal int
Starting channel in output packet for this segment (e.g.final byte[]
Static bytes to be sent. -
Constructor Summary
ConstructorsConstructorDescriptionSegment
(byte[] staticBytes, int channel) Segment that represents flat, static byte dataSegment
(int[] indices) Default RGB segment for a given set of indices at offset 0Segment
(int[] indices, LXBufferOutput.ByteEncoder byteEncoder) Segment with specified indices and byte orderingSegment
(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel) Segment with specified indices, byte ordering and channel offsetSegment
(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel, int outputStride, LXParameter brightness) Segment with specified indices, byte ordering and channel offset, custom output strideSegment
(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel, LXParameter brightness) Segment with specified indices, byte ordering and channel offset -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of channels required in an output packet to send this segment
-
Field Details
-
staticBytes
public final byte[] staticBytesStatic bytes to be sent. -
indices
public final int[] indicesGlobally indexed buffer of point indices in this segment, relative to master color buffer. -
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 startChannelStarting channel in output packet for this segment (e.g. ArtNet channel) -
outputStride
public final int outputStrideHow many bytes spacing is placed between each pixel value, typically this is byteEncoder.numBytes() but may be specified larger -
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
Segment with specified indices and byte ordering- Parameters:
indices
- Array of indices into master color bufferbyteEncoder
- Byte encoder to use when sending
-
Segment
Segment with specified indices, byte ordering and channel offset- Parameters:
indices
- Array of indices into master color bufferbyteEncoder
- Byte encoder to use when sending sendchannel
- 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 bufferbyteEncoder
- Byte encoder to sendchannel
- Channel offset in the output packetbrightness
- Brightness of this segment
-
Segment
public Segment(int[] indices, LXBufferOutput.ByteEncoder byteEncoder, int channel, int outputStride, LXParameter brightness) Segment with specified indices, byte ordering and channel offset, custom output stride- Parameters:
indices
- Array of indices into master color bufferbyteEncoder
- Byte encoder to sendchannel
- Channel offset in the output packetbrightness
- Brightness of this segment
-
Segment
public Segment(byte[] staticBytes, int channel) Segment that represents flat, static byte data- Parameters:
staticBytes
- Fixed byte array data in the segmentchannel
- Channel to copy data at
-
-
Method Details
-
getRequiredChannels
public int getRequiredChannels()Gets the number of channels required in an output packet to send this segment- Returns:
- required channels to send this segment
-