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
Modifier 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
Total length of this segment in bytes, which is a function of both the number of points and the byte ordering.final int
End channel (inclusive) for this segmentfinal int[]
Globally indexed buffer of point indices in this segment, relative to master color buffer.final int
Starting channel in output packet for this segment (e.g. -
Constructor Summary
ConstructorDescriptionSegment
(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, LXParameter brightness) Segment with specified indices, byte ordering and channel offset -
Method Summary
-
Field Details
-
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) -
endChannel
public final int endChannelEnd channel (inclusive) for this segment -
byteLength
public final int byteLengthTotal length of this segment in bytes, which is a function of both the number of points and the byte ordering. -
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
-