![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Implements a horizontal blur effect for pixel groups. More...
#include <HorizontalBlur.h>


Public Member Functions | |
| HorizontalBlur (uint8_t pixels) | |
Constructs a HorizontalBlur effect with a specified blur radius. | |
| void | ApplyEffect (IPixelGroup *pixelGroup) override |
| Applies the horizontal blur effect to the given pixel group. | |
Public Member Functions inherited from Effect | |
| Effect () | |
Default constructor for the Effect class. | |
| void | SetRatio (float ratio) |
| Sets the scaling ratio for the effect. | |
Private Attributes | |
| const uint8_t | pixels |
| The number of neighboring pixels to blend for the blur effect. | |
Additional Inherited Members | |
Protected Attributes inherited from Effect | |
| float | ratio = 0.0f |
| A scaling ratio used for dynamic effect adjustments. | |
Implements a horizontal blur effect for pixel groups.
The HorizontalBlur effect blends pixel colors along the X-axis over a specified number of neighboring pixels, producing a blur effect.
Definition at line 25 of file HorizontalBlur.h.
| HorizontalBlur | ( | uint8_t | pixels | ) |
Constructs a HorizontalBlur effect with a specified blur radius.
| pixels | The radius of the blur effect in terms of the number of neighboring pixels. |
Definition at line 3 of file HorizontalBlur.cpp.
|
overridevirtual |
Applies the horizontal blur effect to the given pixel group.
This method blends the colors of neighboring pixels along the X-axis to create a smooth transition effect.
| pixelGroup | Pointer to the IPixelGroup to which the effect will be applied. |
Implements Effect.
Definition at line 5 of file HorizontalBlur.cpp.
References RGBColor::B, Mathematics::Constrain(), RGBColor::G, IPixelGroup::GetColorBuffer(), IPixelGroup::GetColors(), IPixelGroup::GetLeftIndex(), IPixelGroup::GetPixelCount(), IPixelGroup::GetRightIndex(), Mathematics::Map(), pixels, RGBColor::R, and Effect::ratio.
The number of neighboring pixels to blend for the blur effect.
Definition at line 27 of file HorizontalBlur.h.
Referenced by ApplyEffect().