A modifier that will set a pixels colour if it's intensity is outside a set threshold. More...
#include <thresholdmodifier.h>
Public Types | |
enum | ReplaceMode { RM_PixelIntensity = 1, RM_ColourChannels = 2 } |
An enum to describe with what granularity pixels will be checked and replaced. More... | |
enum | ThresholdMode { TM_Above = 1, TM_Below = 2, TM_OutsideRange = TM_Below | TM_Above } |
An enum to describe when to replace the colour of a pixel. More... | |
Public Member Functions | |
ThresholdModifier () | |
Blank constructor. | |
virtual | ~ThresholdModifier () |
Class destructor. | |
virtual String | GetName () const |
Gets the name of this modifier. More... | |
virtual void | Modify (TextureBuffer &Buffer) |
Alters the generated pixels in a TextureBuffer. More... | |
ThresholdModifier & | SetColour (const ColourValue &Colour) |
Sets the colour to use if a pixel is outside the set threshold. More... | |
ThresholdModifier & | SetColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0) |
Sets the colour to use if a pixel is outside the set threshold. More... | |
ThresholdModifier & | SetLimitRange (const Real Lower, const Real Upper) |
Sets the lower and upper limit of the threshold. More... | |
ThresholdModifier & | SetLowerLimit (const Real Lower) |
Sets the lower limit of the threshold. More... | |
ThresholdModifier & | SetReplaceMode (const ReplaceMode Mode) |
Sets the components of the pixel to be replaced. More... | |
ThresholdModifier & | SetThresholdMode (const ThresholdMode Mode) |
Sets which limits are to be considered for the threshold. More... | |
ThresholdModifier & | SetUpperLimit (const Real Upper) |
Sets the upper limit of the threshold. More... | |
Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier | |
TextureModifier () | |
Blank constructor. | |
virtual | ~TextureModifier () |
Class destructor. | |
Protected Attributes | |
Real | LowerLimit |
The lower limit of the threshold to check for. More... | |
UInt16 | Replace |
The mode that determines the granularity of checks to be performed. More... | |
UInt16 | Threshold |
The mode that determines which limits are used for the allowed threshold. More... | |
ColourValue | ThresholdColour |
The colour to apply if the pixel is outside the allowed threshold. More... | |
Real | UpperLimit |
The upper limit of the threshold to check for. More... | |
A modifier that will set a pixels colour if it's intensity is outside a set threshold.
Definition at line 82 of file thresholdmodifier.h.
An enum to describe with what granularity pixels will be checked and replaced.
Definition at line 93 of file thresholdmodifier.h.
An enum to describe when to replace the colour of a pixel.
Definition at line 86 of file thresholdmodifier.h.
|
virtual |
Gets the name of this modifier.
Implements Mezzanine::Graphics::Procedural::TextureModifier.
Definition at line 134 of file thresholdmodifier.cpp.
|
virtual |
Alters the generated pixels in a TextureBuffer.
Buffer | The buffer to be modified. |
Implements Mezzanine::Graphics::Procedural::TextureModifier.
Definition at line 92 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetColour | ( | const ColourValue & | Colour | ) |
Sets the colour to use if a pixel is outside the set threshold.
Colour | The colour to apply if the pixel intensity is outside the allowed threshold. Initial Value: (0.0,0.0,0.0,1.0). |
Definition at line 140 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetColour | ( | const Real | Red, |
const Real | Green, | ||
const Real | Blue, | ||
const Real | Alpha = 1.0 |
||
) |
Sets the colour to use if a pixel is outside the set threshold.
Red | The amount of Red to apply if the pixel intensity is outside the allowed threshold. Initial Value: 0.0. |
Green | The amount of Green to apply if the pixel intensity is outside the allowed threshold. Initial Value: 0.0. |
Blue | The amount of Blue to apply if the pixel intensity is outside the allowed threshold. Initial Value: 0.0. |
Alpha | The amount of Alpha to apply if the pixel intensity is outside the allowed threshold. Initial Value: 1.0. |
Definition at line 143 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetLimitRange | ( | const Real | Lower, |
const Real | Upper | ||
) |
Sets the lower and upper limit of the threshold.
Lower | The lower limit of the threshold to check for. Initial Value: 0.0. |
Upper | The upper limit of the threshold to check for. Initial Value: 1.0. |
Definition at line 152 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetLowerLimit | ( | const Real | Lower | ) |
Sets the lower limit of the threshold.
Lower | The lower limit of the threshold to check for. Initial Value: 0.0. |
Definition at line 146 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetReplaceMode | ( | const ReplaceMode | Mode | ) |
Sets the components of the pixel to be replaced.
Mode | The mode that determines the granularity of checks to be performed. Initial Value: RM_PixelIntensity. |
Definition at line 158 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetThresholdMode | ( | const ThresholdMode | Mode | ) |
Sets which limits are to be considered for the threshold.
Mode | The mode that determines which limits are used for the allowed threshold. Initial Value: TM_Below. |
Definition at line 155 of file thresholdmodifier.cpp.
ThresholdModifier & Mezzanine::Graphics::Procedural::ThresholdModifier::SetUpperLimit | ( | const Real | Upper | ) |
Sets the upper limit of the threshold.
Upper | The upper limit of the threshold to check for. Initial Value: 1.0. |
Definition at line 149 of file thresholdmodifier.cpp.
|
protected |
The lower limit of the threshold to check for.
Definition at line 104 of file thresholdmodifier.h.
|
protected |
The mode that determines the granularity of checks to be performed.
Definition at line 113 of file thresholdmodifier.h.
|
protected |
The mode that determines which limits are used for the allowed threshold.
Definition at line 110 of file thresholdmodifier.h.
|
protected |
The colour to apply if the pixel is outside the allowed threshold.
Definition at line 101 of file thresholdmodifier.h.
|
protected |
The upper limit of the threshold to check for.
Definition at line 107 of file thresholdmodifier.h.