ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
IPixelGroup Class Referenceabstract

Interface for managing and interacting with a collection of pixels. More...

#include <IPixelGroup.h>

Inheritance diagram for IPixelGroup:

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 RGBColorGetColor (uint16_t count)=0
 Retrieves the color of a specific pixel.
 
virtual RGBColorGetColors ()=0
 Retrieves the array of colors for the pixel group.
 
virtual RGBColorGetColorBuffer ()=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.
 

Detailed Description

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.

Member Enumeration Documentation

◆ Direction

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.

Member Function Documentation

◆ ContainsVector2D()

virtual bool ContainsVector2D ( Vector2D  v)
pure virtual

Checks if the pixel group contains a specific vector.

Parameters
vThe vector to check.
Returns
True if the group contains the vector, otherwise false.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.

◆ GetAlternateXIndex()

virtual bool GetAlternateXIndex ( uint16_t  count,
uint16_t index 
)
pure virtual

Retrieves an alternate X-axis index for a given pixel.

Parameters
countThe index of the current pixel.
indexPointer to store the alternate X index.
Returns
True if an alternate index exists, otherwise false.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.

◆ GetAlternateYIndex()

virtual bool GetAlternateYIndex ( uint16_t  count,
uint16_t index 
)
pure virtual

Retrieves an alternate Y-axis index for a given pixel.

Parameters
countThe index of the current pixel.
indexPointer to store the alternate Y index.
Returns
True if an alternate index exists, otherwise false.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.

◆ GetCenterCoordinate()

virtual Vector2D GetCenterCoordinate ( )
pure virtual

Retrieves the center coordinate of the pixel group.

Returns
The center coordinate as a Vector2D.

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().

◆ GetColor()

◆ GetColorBuffer()

◆ GetColors()

◆ GetCoordinate()

virtual Vector2D GetCoordinate ( uint16_t  count)
pure virtual

◆ GetDownIndex()

virtual bool GetDownIndex ( uint16_t  count,
uint16_t downIndex 
)
pure virtual

Retrieves the index of the pixel below a given pixel.

Parameters
countThe index of the current pixel.
downIndexPointer to store the index of the pixel below.
Returns
True if a pixel below exists, otherwise false.

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().

◆ GetLeftIndex()

virtual bool GetLeftIndex ( uint16_t  count,
uint16_t leftIndex 
)
pure virtual

Retrieves the index of the pixel to the left of a given pixel.

Parameters
countThe index of the current pixel.
leftIndexPointer to store the index of the pixel to the left.
Returns
True if a pixel to the left exists, otherwise false.

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().

◆ GetOffsetXIndex()

virtual bool GetOffsetXIndex ( uint16_t  count,
uint16_t index,
int  x1 
)
pure virtual

Retrieves an offset X-axis index for a given pixel.

Parameters
countThe index of the current pixel.
indexPointer to store the offset X index.
x1The X-axis offset value.
Returns
True if an offset index exists, otherwise false.

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().

◆ GetOffsetXYIndex()

virtual bool GetOffsetXYIndex ( uint16_t  count,
uint16_t index,
int  x1,
int  y1 
)
pure virtual

Retrieves an offset XY-axis index for a given pixel.

Parameters
countThe index of the current pixel.
indexPointer to store the offset XY index.
x1The X-axis offset value.
y1The Y-axis offset value.
Returns
True if an offset index exists, otherwise false.

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().

◆ GetOffsetYIndex()

virtual bool GetOffsetYIndex ( uint16_t  count,
uint16_t index,
int  y1 
)
pure virtual

Retrieves an offset Y-axis index for a given pixel.

Parameters
countThe index of the current pixel.
indexPointer to store the offset Y index.
y1The Y-axis offset value.
Returns
True if an offset index exists, otherwise false.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.

Referenced by PhaseOffsetY::ApplyEffect().

◆ GetPixelCount()

◆ GetPixelIndex()

virtual int GetPixelIndex ( Vector2D  location)
pure virtual

Retrieves the index of a pixel at a specific location.

Parameters
locationThe location to search for a pixel.
Returns
The index of the pixel, or -1 if not found.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.

◆ GetRadialIndex()

virtual bool GetRadialIndex ( uint16_t  count,
uint16_t index,
int  pixels,
float  angle 
)
pure virtual

Retrieves a radial index for a given pixel based on distance and angle.

Parameters
countThe index of the current pixel.
indexPointer to store the radial index.
pixelsThe radial distance in pixels.
angleThe angle in degrees.
Returns
True if a radial index exists, otherwise false.

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().

◆ GetRightIndex()

virtual bool GetRightIndex ( uint16_t  count,
uint16_t rightIndex 
)
pure virtual

Retrieves the index of the pixel to the right of a given pixel.

Parameters
countThe index of the current pixel.
rightIndexPointer to store the index of the pixel to the right.
Returns
True if a pixel to the right exists, otherwise false.

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().

◆ GetSize()

virtual Vector2D GetSize ( )
pure virtual

◆ GetUpIndex()

virtual bool GetUpIndex ( uint16_t  count,
uint16_t upIndex 
)
pure virtual

Retrieves the index of the pixel above a given pixel.

Parameters
countThe index of the current pixel.
upIndexPointer to store the index of the pixel above.
Returns
True if a pixel above exists, otherwise false.

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().

◆ GridSort()

virtual void GridSort ( )
pure virtual

◆ Overlaps()

virtual bool Overlaps ( BoundingBox2D box)
pure virtual

Checks if the pixel group overlaps with a bounding box.

Parameters
boxPointer to the bounding box.
Returns
True if the group overlaps with the box, otherwise false.

Implemented in PixelGroup< pixelCount >, PixelGroup< 2048 >, PixelGroup< 27 >, PixelGroup< 306 >, PixelGroup< 36 >, PixelGroup< 571 >, PixelGroup< 88 >, and PixelGroup< 89 >.


The documentation for this class was generated from the following file: