Drag[en]gine Game Engine  1.0
deEffectFilterKernel Class Reference

Effect Filter Kernel Class. More...

#include <deEffectFilterKernel.h>

Inheritance diagram for deEffectFilterKernel:
deEffect deResource deObject

Public Member Functions

Management
int GetKernelRows () const
 
int GetKernelCols () const
 
void SetKernelSize (int rows, int cols)
 
float GetKernelValueAt (int row, int col) const
 
void SetKernelValueAt (int row, int col, float value)
 
float GetScale () const
 Scale of kernel. More...
 
void SetScale (float scale)
 Set scale of kernel. More...
 
Visiting
virtual void Visit (deEffectVisitor *visitor)
 
- Public Member Functions inherited from deEffect
bool GetEnabled () const
 
void SetEnabled (bool enabled)
 
deBaseGraphicEffectGetGraphicEffect () const
 
void SetGraphicEffect (deBaseGraphicEffect *graEffect)
 
 deEffect (deEffectManager *manager)
 
- Public Member Functions inherited from deResource
deResourceManagerGetResourceManager () const
 Resource manager or NULL if resource is leaking. More...
 
deEngineGetEngine () const
 Game engine object from resource manager. More...
 
deResourceGetLLManagerPrev () const
 Previous resource in the resource manager linked list. More...
 
void SetLLManagerPrev (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
deResourceGetLLManagerNext () const
 Next resource in the resource manager linked list. More...
 
void SetLLManagerNext (deResource *resource)
 Set next resource in the resource manager linked list. More...
 
void MarkLeaking ()
 Marks the resource leaking. More...
 
 deResource (deResourceManager *resourceManager)
 Create resource. More...
 
- Public Member Functions inherited from deObject
int GetRefCount () const
 Reference count. More...
 
void AddReference ()
 Add reference increasing reference count by 1. More...
 
void FreeReference ()
 Decrease reference count by one and delete object if count reaches 0. More...
 
 deObject ()
 Create object with reference count of 1. More...
 

Constructors and Destructors

 deEffectFilterKernel (deEffectManager *manager)
 
virtual ~deEffectFilterKernel ()
 Clean up world. More...
 

Additional Inherited Members

- Protected Member Functions inherited from deEffect
virtual ~deEffect ()
 Clean up world. More...
 
- Protected Member Functions inherited from deResource
virtual ~deResource ()
 Clean up resource. More...
 
- Protected Member Functions inherited from deObject
virtual ~deObject ()
 Clean up object. More...
 

Detailed Description

Effect Filter Kernel Class.

Filter kernel effects are post processing effects that manipulate the final image after rendering. A filter kernel of a given size is applied to every pixel of the final image multiplying the neighboring pixels with the values stored in the filter kernel and clamping the result to valid color values.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deEffectFilterKernel()

deEffectFilterKernel::deEffectFilterKernel ( deEffectManager manager)

Creates a new effect filter kernel object with the given resource manager.

◆ ~deEffectFilterKernel()

virtual deEffectFilterKernel::~deEffectFilterKernel ( )
protectedvirtual

Clean up world.

Note
Subclasses should set their destructor protected too to avoid users accidently deleting a reference counted object through the object pointer. Only FreeReference() is allowed to delete the object.

Member Function Documentation

◆ GetKernelCols()

int deEffectFilterKernel::GetKernelCols ( ) const
inline

Retrieves the cols of the filter kernel.

References GetKernelValueAt(), SetKernelSize(), and SetKernelValueAt().

◆ GetKernelRows()

int deEffectFilterKernel::GetKernelRows ( ) const
inline

Retrieves the rows of the filter kernel.

◆ GetKernelValueAt()

float deEffectFilterKernel::GetKernelValueAt ( int  row,
int  col 
) const

Retrieves kernel value at the given location.

Referenced by GetKernelCols().

◆ GetScale()

float deEffectFilterKernel::GetScale ( ) const
inline

Scale of kernel.

References SetScale(), and Visit().

◆ SetKernelSize()

void deEffectFilterKernel::SetKernelSize ( int  rows,
int  cols 
)

Sets the size of the filter kernel. The size has to be at least 1 in each direction and has to be odd. The oddness is required as the middle value in the filter kernel corresponds to the pixel filtered in the final image.

Referenced by GetKernelCols().

◆ SetKernelValueAt()

void deEffectFilterKernel::SetKernelValueAt ( int  row,
int  col,
float  value 
)

Sets the kernel value at the given location.

Referenced by GetKernelCols().

◆ SetScale()

void deEffectFilterKernel::SetScale ( float  scale)

Set scale of kernel.

Referenced by GetScale().

◆ Visit()

virtual void deEffectFilterKernel::Visit ( deEffectVisitor visitor)
virtual

Visits the effect.

Reimplemented from deEffect.

Referenced by GetScale().


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