ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
HorizontalBlur.h
Go to the documentation of this file.
1/**
2 * @file HorizontalBlur.h
3 * @brief Defines the `HorizontalBlur` effect class for applying horizontal blur to pixel groups.
4 *
5 * The `HorizontalBlur` effect smooths pixel values by blending neighboring pixels
6 * along the X-axis, creating a blur effect.
7 *
8 * @date 22/12/2024
9 * @version 1.0
10 * @author Coela Can't
11 */
12
13#pragma once
14
15#include "Effect.h"
16#include "../../Utils/Math/Mathematics.h"
17
18/**
19 * @class HorizontalBlur
20 * @brief Implements a horizontal blur effect for pixel groups.
21 *
22 * The `HorizontalBlur` effect blends pixel colors along the X-axis over a specified
23 * number of neighboring pixels, producing a blur effect.
24 */
25class HorizontalBlur : public Effect {
26private:
27 const uint8_t pixels; ///< The number of neighboring pixels to blend for the blur effect.
28
29public:
30 /**
31 * @brief Constructs a `HorizontalBlur` effect with a specified blur radius.
32 *
33 * @param pixels The radius of the blur effect in terms of the number of neighboring pixels.
34 */
35 HorizontalBlur(uint8_t pixels);
36
37 /**
38 * @brief Applies the horizontal blur effect to the given pixel group.
39 *
40 * This method blends the colors of neighboring pixels along the X-axis to create
41 * a smooth transition effect.
42 *
43 * @param pixelGroup Pointer to the `IPixelGroup` to which the effect will be applied.
44 */
45 void ApplyEffect(IPixelGroup* pixelGroup) override;
46};
Defines the base Effect class for applying transformations or effects to pixel groups.
Abstract base class for applying visual effects to pixel groups.
Definition Effect.h:26
Implements a horizontal blur effect for pixel groups.
void ApplyEffect(IPixelGroup *pixelGroup) override
Applies the horizontal blur effect to the given pixel group.
const uint8_t pixels
The number of neighboring pixels to blend for the blur effect.
Interface for managing and interacting with a collection of pixels.
Definition IPixelGroup.h:25