ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
VerticalBlur.h
Go to the documentation of this file.
1/**
2 * @file VerticalBlur.h
3 * @brief Defines the `VerticalBlur` effect class for applying a vertical blur effect.
4 *
5 * The `VerticalBlur` effect softens the visual appearance of a pixel group
6 * by averaging pixel values along the vertical axis.
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
17/**
18 * @class VerticalBlur
19 * @brief An effect that applies a vertical blur to a pixel group.
20 *
21 * The `VerticalBlur` effect modifies pixel colors by averaging neighboring pixels
22 * along the vertical axis, creating a softened appearance.
23 */
24class VerticalBlur : public Effect {
25private:
26 /// Number of pixels to include in the vertical blur radius.
27 const uint8_t pixels;
28
29public:
30 /**
31 * @brief Constructs a `VerticalBlur` effect instance.
32 *
33 * @param pixels Number of pixels to include in the blur radius.
34 */
35 VerticalBlur(uint8_t pixels);
36
37 /**
38 * @brief Applies the vertical blur effect to the given pixel group.
39 *
40 * The effect calculates an average color value for each pixel by considering
41 * neighboring pixels within the specified vertical radius.
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
Interface for managing and interacting with a collection of pixels.
Definition IPixelGroup.h:25
An effect that applies a vertical blur to a pixel group.
void ApplyEffect(IPixelGroup *pixelGroup) override
Applies the vertical blur effect to the given pixel group.
const uint8_t pixels
Number of pixels to include in the vertical blur radius.