![]() |
ProtoTracer
1.0
Real-time 3D rendering and animation engine
|
Implements an overflow distortion effect for pixel groups. More...
#include <Overflow.h>
Public Member Functions | |
Overflow (uint8_t pixels) | |
Constructs an Overflow effect with a specified number of affected pixels. | |
void | ApplyEffect (IPixelGroup *pixelGroup) override |
Applies the overflow distortion effect to the given pixel group. | |
![]() | |
Effect () | |
Default constructor for the Effect class. | |
void | SetRatio (float ratio) |
Sets the scaling ratio for the effect. | |
Private Attributes | |
const uint8_t | pixels |
Number of pixels to affect in the group. | |
Additional Inherited Members | |
![]() | |
float | ratio = 0.0f |
A scaling ratio used for dynamic effect adjustments. | |
Implements an overflow distortion effect for pixel groups.
The Overflow
effect intentionally overflows 8-bit pixel values, creating dynamic wrap-around effects that result in unexpected color distortions.
Definition at line 24 of file Overflow.h.
Constructs an Overflow
effect with a specified number of affected pixels.
pixels | The number of pixels to apply the overflow effect to. |
Definition at line 3 of file Overflow.cpp.
|
overridevirtual |
Applies the overflow distortion effect to the given pixel group.
This method modifies pixel color values, forcing them to exceed their 8-bit limits, and wraps them around using modulo arithmetic.
pixelGroup | Pointer to the IPixelGroup to which the effect will be applied. |
Implements Effect.
Definition at line 5 of file Overflow.cpp.
References RGBColor::B, RGBColor::G, IPixelGroup::GetColors(), IPixelGroup::GetPixelCount(), and RGBColor::R.
Number of pixels to affect in the group.
Definition at line 26 of file Overflow.h.