Spinning Topp Logo BlackTopp Studios
inc
Public Types | Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::Procedural::ChannelModifier Class Reference

A modifier that will zero out selected colour channels or produce a grey version of the provided texture. More...

#include <channelmodifier.h>

+ Inheritance diagram for Mezzanine::Graphics::Procedural::ChannelModifier:
+ Collaboration diagram for Mezzanine::Graphics::Procedural::ChannelModifier:

Public Types

enum  ChannelSelect {
  CS_Red = 1, CS_Green = 2, CS_Blue = 4, CS_Alpha = 8,
  CS_Gray = 16
}
 An enum describing the operation to be taken. More...
 

Public Member Functions

 ChannelModifier ()
 Blank constructor.
 
virtual ~ChannelModifier ()
 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...
 
ChannelModifierSetSelection (const Whole Op)
 Sets the channels that are to be zero'd or if the modifier should generate a gray texture. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

Whole ChannelOp
 A bitfield containing the operation to be performed. More...
 

Detailed Description

A modifier that will zero out selected colour channels or produce a grey version of the provided texture.

Definition at line 82 of file channelmodifier.h.

Member Enumeration Documentation

An enum describing the operation to be taken.

Enumerator
CS_Red 

Zero the red channel for each pixel in the texture. Ignored if "CS_Gray" is selected.

CS_Green 

Zero the green channel for each pixel in the texture. Ignored if "CS_Gray" is selected.

CS_Blue 

Zero the blue channel for each pixel in the texture. Ignored if "CS_Gray" is selected.

CS_Alpha 

Zero the alpha channel for each pixel in the texture. Warning: This will make the texture disappear. Ignored if "CS_Gray" is selected.

CS_Gray 

Generate a black and white version of the image by averaging channel intensities.

Definition at line 86 of file channelmodifier.h.

Member Function Documentation

String Mezzanine::Graphics::Procedural::ChannelModifier::GetName ( ) const
virtual

Gets the name of this modifier.

Returns
Returns a string containing the name of this modifier.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 108 of file channelmodifier.cpp.

void Mezzanine::Graphics::Procedural::ChannelModifier::Modify ( TextureBuffer Buffer)
virtual

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 88 of file channelmodifier.cpp.

ChannelModifier & Mezzanine::Graphics::Procedural::ChannelModifier::SetSelection ( const Whole  Op)

Sets the channels that are to be zero'd or if the modifier should generate a gray texture.

Parameters
OpA bitfield containing the operation to be performed. Initial Value: CS_Gray.
Returns
Returns a reference to this.

Definition at line 114 of file channelmodifier.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::ChannelModifier::ChannelOp
protected

A bitfield containing the operation to be performed.

Definition at line 97 of file channelmodifier.h.


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