Blender V2.61 - r43446
|
pixel filter for normal mapping More...
#include <FilterNormal.h>
Public Member Functions | |
FilterNormal (void) | |
constructor | |
virtual | ~FilterNormal (void) |
destructor | |
unsigned short | getColor (void) |
get index of color used to calculate normals | |
void | setColor (unsigned short colIdx) |
set index of color used to calculate normals | |
float | getDepth (void) |
get depth | |
void | setDepth (float depth) |
set depth | |
Protected Member Functions | |
template<class SRC > | |
unsigned int | tFilter (SRC *src, short x, short y, short *size, unsigned int pixSize, unsigned int val=0) |
filter pixel, source int buffer | |
virtual unsigned int | filter (unsigned char *src, short x, short y, short *size, unsigned int pixSize, unsigned int val=0) |
filter pixel, source byte buffer | |
virtual unsigned int | filter (unsigned int *src, short x, short y, short *size, unsigned int pixSize, unsigned int val=0) |
filter pixel, source int buffer | |
Protected Attributes | |
float | m_depth |
depth of normal relief | |
float | m_depthScale |
scale to calculate normals | |
unsigned short | m_colIdx |
color index, 0=red, 1=green, 2=blue, 3=alpha |
pixel filter for normal mapping
Definition at line 41 of file FilterNormal.h.
FilterNormal::FilterNormal | ( | void | ) |
virtual FilterNormal::~FilterNormal | ( | void | ) | [inline, virtual] |
destructor
Definition at line 47 of file FilterNormal.h.
virtual unsigned int FilterNormal::filter | ( | unsigned char * | src, |
short | x, | ||
short | y, | ||
short * | size, | ||
unsigned int | pixSize, | ||
unsigned int | val = 0 |
||
) | [inline, protected, virtual] |
filter pixel, source byte buffer
Reimplemented from FilterBase.
Definition at line 101 of file FilterNormal.h.
References tFilter(), and simple_enum_gen::val.
virtual unsigned int FilterNormal::filter | ( | unsigned int * | src, |
short | x, | ||
short | y, | ||
short * | size, | ||
unsigned int | pixSize, | ||
unsigned int | val = 0 |
||
) | [inline, protected, virtual] |
filter pixel, source int buffer
Reimplemented from FilterBase.
Definition at line 105 of file FilterNormal.h.
References tFilter(), and simple_enum_gen::val.
unsigned short FilterNormal::getColor | ( | void | ) | [inline] |
get index of color used to calculate normals
Definition at line 50 of file FilterNormal.h.
References m_colIdx.
float FilterNormal::getDepth | ( | void | ) | [inline] |
void FilterNormal::setColor | ( | unsigned short | colIdx | ) |
set index of color used to calculate normals
Definition at line 45 of file FilterNormal.cpp.
References m_colIdx.
void FilterNormal::setDepth | ( | float | depth | ) |
set depth
Definition at line 54 of file FilterNormal.cpp.
References depthScaleKoef, m_depth, and m_depthScale.
Referenced by FilterNormal().
unsigned int FilterNormal::tFilter | ( | SRC * | src, |
short | x, | ||
short | y, | ||
short * | size, | ||
unsigned int | pixSize, | ||
unsigned int | val = 0 |
||
) | [inline, protected] |
filter pixel, source int buffer
Definition at line 69 of file FilterNormal.h.
References FilterBase::convertPrevious(), m_colIdx, m_depthScale, normScaleKoef, sqrt(), simple_enum_gen::val, VT_C, and VT_RGBA.
Referenced by filter().
unsigned short FilterNormal::m_colIdx [protected] |
color index, 0=red, 1=green, 2=blue, 3=alpha
Definition at line 66 of file FilterNormal.h.
Referenced by getColor(), setColor(), and tFilter().
float FilterNormal::m_depth [protected] |
depth of normal relief
Definition at line 61 of file FilterNormal.h.
Referenced by getDepth(), and setDepth().
float FilterNormal::m_depthScale [protected] |
scale to calculate normals
Definition at line 63 of file FilterNormal.h.
Referenced by setDepth(), and tFilter().