ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
RadialBlur.h
Go to the documentation of this file.
1/**
2 * @file RadialBlur.h
3 * @brief Defines the `RadialBlur` effect class for applying a radial blur to pixel groups.
4 *
5 * The `RadialBlur` effect creates a circular blur effect, simulating radial motion,
6 * for visually dynamic animations.
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/Signals/FunctionGenerator.h"
17#include "../../Utils/Math/Mathematics.h"
18
19/**
20 * @class RadialBlur
21 * @brief Applies a radial blur effect to pixel groups.
22 *
23 * The `RadialBlur` effect uses a function generator to create rotational motion,
24 * resulting in a circular blur effect.
25 */
26class RadialBlur : public Effect {
27private:
28 const uint8_t pixels; ///< Number of pixels to apply the effect to.
29
30 /// Function generator for controlling the rotational motion of the blur.
32
33public:
34 /**
35 * @brief Constructs a `RadialBlur` effect instance.
36 *
37 * @param pixels The number of pixels to apply the effect to.
38 */
39 RadialBlur(uint8_t pixels);
40
41 /**
42 * @brief Applies the radial blur effect to the given pixel group.
43 *
44 * This method modifies the pixel group by simulating a circular blur effect.
45 *
46 * @param pixelGroup Pointer to the `IPixelGroup` to which the effect will be applied.
47 */
48 void ApplyEffect(IPixelGroup* pixelGroup) override;
49};
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
A class to generate various waveform functions with customizable parameters.
@ Sawtooth
Sawtooth waveform.
Interface for managing and interacting with a collection of pixels.
Definition IPixelGroup.h:25
Applies a radial blur effect to pixel groups.
Definition RadialBlur.h:26
void ApplyEffect(IPixelGroup *pixelGroup) override
Applies the radial blur effect to the given pixel group.
Definition RadialBlur.cpp:6
FunctionGenerator fGenRotation
Function generator for controlling the rotational motion of the blur.
Definition RadialBlur.h:31
const uint8_t pixels
Number of pixels to apply the effect to.
Definition RadialBlur.h:28