![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Interface for managing and interacting with a collection of pixels. More...
#include <IPixelGroup.h>
Public Types | |
enum | Direction { ZEROTOMAX , MAXTOZERO } |
Specifies traversal directions for pixels. More... | |
Public Member Functions | |
virtual Vector2D | GetCenterCoordinate ()=0 |
Retrieves the center coordinate of the pixel group. | |
virtual Vector2D | GetSize ()=0 |
Retrieves the size of the pixel group. | |
virtual Vector2D | GetCoordinate (uint16_t count)=0 |
Retrieves the coordinate of a specific pixel. | |
virtual int | GetPixelIndex (Vector2D location)=0 |
Retrieves the index of a pixel at a specific location. | |
virtual RGBColor * | GetColor (uint16_t count)=0 |
Retrieves the color of a specific pixel. | |
virtual RGBColor * | GetColors ()=0 |
Retrieves the array of colors for the pixel group. | |
virtual RGBColor * | GetColorBuffer ()=0 |
Retrieves the color buffer for the pixel group. | |
virtual uint16_t | GetPixelCount ()=0 |
Retrieves the total number of pixels in the group. | |
virtual bool | Overlaps (BoundingBox2D *box)=0 |
Checks if the pixel group overlaps with a bounding box. | |
virtual bool | ContainsVector2D (Vector2D v)=0 |
Checks if the pixel group contains a specific vector. | |
virtual bool | GetUpIndex (uint16_t count, uint16_t *upIndex)=0 |
Retrieves the index of the pixel above a given pixel. | |
virtual bool | GetDownIndex (uint16_t count, uint16_t *downIndex)=0 |
Retrieves the index of the pixel below a given pixel. | |
virtual bool | GetLeftIndex (uint16_t count, uint16_t *leftIndex)=0 |
Retrieves the index of the pixel to the left of a given pixel. | |
virtual bool | GetRightIndex (uint16_t count, uint16_t *rightIndex)=0 |
Retrieves the index of the pixel to the right of a given pixel. | |
virtual bool | GetAlternateXIndex (uint16_t count, uint16_t *index)=0 |
Retrieves an alternate X-axis index for a given pixel. | |
virtual bool | GetAlternateYIndex (uint16_t count, uint16_t *index)=0 |
Retrieves an alternate Y-axis index for a given pixel. | |
virtual bool | GetOffsetXIndex (uint16_t count, uint16_t *index, int x1)=0 |
Retrieves an offset X-axis index for a given pixel. | |
virtual bool | GetOffsetYIndex (uint16_t count, uint16_t *index, int y1)=0 |
Retrieves an offset Y-axis index for a given pixel. | |
virtual bool | GetOffsetXYIndex (uint16_t count, uint16_t *index, int x1, int y1)=0 |
Retrieves an offset XY-axis index for a given pixel. | |
virtual bool | GetRadialIndex (uint16_t count, uint16_t *index, int pixels, float angle)=0 |
Retrieves a radial index for a given pixel based on distance and angle. | |
virtual void | GridSort ()=0 |
Sorts the pixels in a grid structure. | |
Interface for managing and interacting with a collection of pixels.
The IPixelGroup interface provides methods for retrieving pixel properties, spatial relationships, and color data. Implementations of this interface can manage rectangular grids or arbitrary pixel arrangements.
Definition at line 25 of file IPixelGroup.h.
Specifies traversal directions for pixels.
Enumerator | |
---|---|
ZEROTOMAX | Traverse from minimum to maximum indices. |
MAXTOZERO | Traverse from maximum to minimum indices. |
Definition at line 31 of file IPixelGroup.h.
Checks if the pixel group contains a specific vector.
v | The vector to check. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Retrieves an alternate X-axis index for a given pixel.
count | The index of the current pixel. |
index | Pointer to store the alternate X index. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Retrieves an alternate Y-axis index for a given pixel.
count | The index of the current pixel. |
index | Pointer to store the alternate Y index. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Retrieves the center coordinate of the pixel group.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Fisheye::ApplyEffect(), and Magnet::ApplyEffect().
Retrieves the color of a specific pixel.
count | The index of the pixel. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by HeadsUpDisplay::ApplyEffect(), APA102Controller::Display(), HUB75Controller::Display(), HUB75ControllerSplit::Display(), HUB75ControllerSquare::Display(), WS35BetaController::Display(), WS35Controller::Display(), DisplayTest::FillAltWhiteBlack(), DisplayTest::FillWhite(), and Rasterizer::Rasterize().
Retrieves the color buffer for the pixel group.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Fisheye::ApplyEffect(), GlitchX::ApplyEffect(), HorizontalBlur::ApplyEffect(), Magnet::ApplyEffect(), PhaseOffsetR::ApplyEffect(), PhaseOffsetX::ApplyEffect(), RadialBlur::ApplyEffect(), ShiftR::ApplyEffect(), Test::ApplyEffect(), and VerticalBlur::ApplyEffect().
Retrieves the array of colors for the pixel group.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Fisheye::ApplyEffect(), GlitchX::ApplyEffect(), HorizontalBlur::ApplyEffect(), Magnet::ApplyEffect(), Overflow::ApplyEffect(), PhaseOffsetR::ApplyEffect(), PhaseOffsetX::ApplyEffect(), PhaseOffsetY::ApplyEffect(), RadialBlur::ApplyEffect(), ShiftR::ApplyEffect(), Test::ApplyEffect(), and VerticalBlur::ApplyEffect().
Retrieves the coordinate of a specific pixel.
count | The index of the pixel. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by HeadsUpDisplay::ApplyEffect(), Fisheye::ApplyEffect(), Magnet::ApplyEffect(), PhaseOffsetR::ApplyEffect(), PhaseOffsetX::ApplyEffect(), PhaseOffsetY::ApplyEffect(), and Rasterizer::Rasterize().
Retrieves the index of the pixel below a given pixel.
count | The index of the current pixel. |
downIndex | Pointer to store the index of the pixel below. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Test::ApplyEffect(), and VerticalBlur::ApplyEffect().
Retrieves the index of the pixel to the left of a given pixel.
count | The index of the current pixel. |
leftIndex | Pointer to store the index of the pixel to the left. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by HorizontalBlur::ApplyEffect(), and Test::ApplyEffect().
Retrieves an offset X-axis index for a given pixel.
count | The index of the current pixel. |
index | Pointer to store the offset X index. |
x1 | The X-axis offset value. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by GlitchX::ApplyEffect(), and PhaseOffsetX::ApplyEffect().
Retrieves an offset XY-axis index for a given pixel.
count | The index of the current pixel. |
index | Pointer to store the offset XY index. |
x1 | The X-axis offset value. |
y1 | The Y-axis offset value. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Fisheye::ApplyEffect(), and Magnet::ApplyEffect().
Retrieves an offset Y-axis index for a given pixel.
count | The index of the current pixel. |
index | Pointer to store the offset Y index. |
y1 | The Y-axis offset value. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by PhaseOffsetY::ApplyEffect().
Retrieves the total number of pixels in the group.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by HeadsUpDisplay::ApplyEffect(), Fisheye::ApplyEffect(), GlitchX::ApplyEffect(), HorizontalBlur::ApplyEffect(), Magnet::ApplyEffect(), Overflow::ApplyEffect(), PhaseOffsetR::ApplyEffect(), PhaseOffsetX::ApplyEffect(), PhaseOffsetY::ApplyEffect(), RadialBlur::ApplyEffect(), ShiftR::ApplyEffect(), Test::ApplyEffect(), and VerticalBlur::ApplyEffect().
Retrieves the index of a pixel at a specific location.
location | The location to search for a pixel. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
|
pure virtual |
Retrieves a radial index for a given pixel based on distance and angle.
count | The index of the current pixel. |
index | Pointer to store the radial index. |
pixels | The radial distance in pixels. |
angle | The angle in degrees. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by PhaseOffsetR::ApplyEffect(), RadialBlur::ApplyEffect(), and ShiftR::ApplyEffect().
Retrieves the index of the pixel to the right of a given pixel.
count | The index of the current pixel. |
rightIndex | Pointer to store the index of the pixel to the right. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by HorizontalBlur::ApplyEffect(), and Test::ApplyEffect().
Retrieves the size of the pixel group.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Retrieves the index of the pixel above a given pixel.
count | The index of the current pixel. |
upIndex | Pointer to store the index of the pixel above. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
Referenced by Test::ApplyEffect(), and VerticalBlur::ApplyEffect().
Sorts the pixels in a grid structure.
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.
|
pure virtual |
Checks if the pixel group overlaps with a bounding box.
box | Pointer to the bounding box. |
Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.