ProtoTracer  1.0
Real-time 3D rendering and animation engine
Loading...
Searching...
No Matches
Effect Class Referenceabstract

Abstract base class for applying visual effects to pixel groups. More...

#include <Effect.h>

Inheritance diagram for Effect:

Public Member Functions

 Effect ()
 Default constructor for the Effect class.
 
void SetRatio (float ratio)
 Sets the scaling ratio for the effect.
 
virtual void ApplyEffect (IPixelGroup *pixelGroup)=0
 Pure virtual method for applying the effect to a pixel group.
 

Protected Attributes

float ratio = 0.0f
 A scaling ratio used for dynamic effect adjustments.
 

Detailed Description

Abstract base class for applying visual effects to pixel groups.

The Effect class provides a framework for applying transformations or effects to IPixelGroup objects. Subclasses should implement the ApplyEffect method to define specific effect behavior.

Definition at line 26 of file Effect.h.

Constructor & Destructor Documentation

◆ Effect()

Effect ( )

Default constructor for the Effect class.

Definition at line 3 of file Effect.cpp.

Member Function Documentation

◆ ApplyEffect()

virtual void ApplyEffect ( IPixelGroup pixelGroup)
pure virtual

Pure virtual method for applying the effect to a pixel group.

Subclasses must override this method to implement the effect's behavior.

Parameters
pixelGroupPointer to the IPixelGroup to which the effect will be applied.

Implemented in HeadsUpDisplay, Fisheye, GlitchX, HorizontalBlur, Magnet, Overflow, Passthrough, PhaseOffsetR, PhaseOffsetX, PhaseOffsetY, RadialBlur, ShiftR, Test, and VerticalBlur.

Referenced by HeadsUpDisplay::ApplyEffect(), and RenderingEngine::Rasterize().

◆ SetRatio()

void SetRatio ( float  ratio)

Sets the scaling ratio for the effect.

The ratio is typically used for time-based or intensity-based transformations.

Parameters
ratioThe scaling ratio to be applied.

Definition at line 5 of file Effect.cpp.

References Mathematics::Constrain(), and ratio.

Referenced by Menu::Update(), BasilGardenAnimation::Update(), SammyAnimation::Update(), TamamoAnimation::Update(), XenraxAnimation::Update(), and WS35AnimationSplit::Update().

Member Data Documentation

◆ ratio


The documentation for this class was generated from the following files: