ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
PhaseOffsetR.h
Go to the documentation of this file.
1/**
2 * @file PhaseOffsetR.h
3 * @brief Defines the `PhaseOffsetR` effect class for applying rotational phase offsets to pixel groups.
4 *
5 * The `PhaseOffsetR` effect modifies pixel groups by applying phase offsets and rotations,
6 * creating dynamic visual patterns.
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 PhaseOffsetR
21 * @brief Applies rotational phase offsets to pixel groups.
22 *
23 * The `PhaseOffsetR` effect uses function generators to create phase offsets and
24 * rotational transformations for dynamic and visually engaging effects.
25 */
26class PhaseOffsetR : public Effect {
27private:
28 const uint8_t pixels; ///< Number of pixels to apply the effect to.
29
30 /// Function generator for the first phase offset.
32
33 /// Function generator for the second phase offset.
35
36 /// Function generator for rotation transformations.
38
39public:
40 /**
41 * @brief Constructs a `PhaseOffsetR` effect instance.
42 *
43 * @param pixels The number of pixels to apply the effect to.
44 */
45 PhaseOffsetR(uint8_t pixels);
46
47 /**
48 * @brief Applies the rotational phase offset effect to the given pixel group.
49 *
50 * This method modifies the pixel group using phase offsets and rotations.
51 *
52 * @param pixelGroup Pointer to the `IPixelGroup` to which the effect will be applied.
53 */
54 void ApplyEffect(IPixelGroup* pixelGroup) override;
55};
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 rotational phase offsets to pixel groups.
FunctionGenerator fGenPhase2
Function generator for the second phase offset.
void ApplyEffect(IPixelGroup *pixelGroup) override
Applies the rotational phase offset effect to the given pixel group.
FunctionGenerator fGenRotation
Function generator for rotation transformations.
FunctionGenerator fGenPhase1
Function generator for the first phase offset.
const uint8_t pixels
Number of pixels to apply the effect to.