67 #ifndef _graphicsproceduralthresholdmodifier_cpp
68 #define _graphicsproceduralthresholdmodifier_cpp
70 #include "Graphics/Procedural/Texture/thresholdmodifier.h"
79 ThresholdColour(0.0,0.0,0.0,1.0),
97 for(
Whole Y = 0 ; Y < TargetHeight ; ++Y )
99 for(
Whole X = 0 ; X < TargetWidth ; ++X )
135 {
return "ThresholdModifier"; }
156 { this->
Threshold = Mode;
return *
this; }
159 { this->
Replace = Mode;
return *
this; }
ColourChannelType & GetPixel(const Whole X, const Whole Y, const UInt16 Component)
Gets access to the pixel at the specified position in this buffer. the X or Y location go beyond the ...
ThresholdModifier()
Blank constructor.
virtual ~ThresholdModifier()
Class destructor.
ThresholdModifier & SetLimitRange(const Real Lower, const Real Upper)
Sets the lower and upper limit of the threshold.
Uses only the upper limit. Any pixel with an intensity above the set upper limit will be replaced...
Whole GetWidth() const
Get the pixel width of this texture.
ThresholdMode
An enum to describe when to replace the colour of a pixel.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
float Real
A Datatype used to represent a real floating point number.
Uses only the lower limit. Any pixel with an intensity below the set lower limit will be replaced...
ThresholdModifier & SetLowerLimit(const Real Lower)
Sets the lower limit of the threshold.
Real GreenChannel
Value from 0.0 to 1.0 representing the amount of green present in the colour. 1.0 if very green...
void SetGreenReal(const Whole X, const Whole Y, const Real Green)
Sets the green colour value of a specified pixel. the X or Y location go beyond the set size of this ...
ThresholdModifier & SetUpperLimit(const Real Upper)
Sets the upper limit of the threshold.
Real UpperLimit
The upper limit of the threshold to check for.
Checks against the total intensity of the pixel and will replace the entire pixel if it is outside th...
void SetValues(const Real Red, const Real Green, const Real Blue, const Real Alpha)
Sets each of the colour channels.
virtual void Modify(TextureBuffer &Buffer)
Alters the generated pixels in a TextureBuffer.
void SetBlueReal(const Whole X, const Whole Y, const Real Blue)
Sets the blue colour value of a specified pixel. the X or Y location go beyond the set size of this t...
UInt16 Threshold
The mode that determines which limits are used for the allowed threshold.
A convenience buffer that stores pixel colour values of a texture to be generated.
void SetRedReal(const Whole X, const Whole Y, const Real Red)
Sets the red colour value of a specified pixel. the X or Y location go beyond the set size of this te...
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Checks each colour channel, and will replace just the colour channels that are outside the set thresh...
Whole GetHeight() const
Get the pixel height of this texture.
Real BlueChannel
Value from 0.0 to 1.0 representing the amount of blue present in the colour. 1.0 if very blue...
void SetPixel(const Whole X, const Whole Y, const ColourValue &Colour)
Set colour of a specified pixel using a ColourValue. the X or Y location go beyond the set size of th...
ColourValue ThresholdColour
The colour to apply if the pixel is outside the allowed threshold.
Real RedChannel
Value from 0.0 to 1.0 representing the amount of red present in the colour. 1.0 if very red...
ReplaceMode
An enum to describe with what granularity pixels will be checked and replaced.
A modifier that will set a pixels colour if it's intensity is outside a set threshold.
virtual String GetName() const
Gets the name of this modifier.
ThresholdModifier & SetReplaceMode(const ReplaceMode Mode)
Sets the components of the pixel to be replaced.
std::string String
A datatype used to a series of characters.
ThresholdModifier & SetThresholdMode(const ThresholdMode Mode)
Sets which limits are to be considered for the threshold.
ThresholdModifier & SetColour(const ColourValue &Colour)
Sets the colour to use if a pixel is outside the set threshold.
UInt16 Replace
The mode that determines the granularity of checks to be performed.
Real LowerLimit
The lower limit of the threshold to check for.