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

A convenience buffer that stores pixel colour values of a texture to be generated. More...

#include <texturebuffer.h>

Public Types

typedef UInt8 ColourChannelType
 Convenience typedef for the datatype containing the value for each colour channel.
 

Public Member Functions

 TextureBuffer (const Whole SquareSize)
 Square size constructor. More...
 
 TextureBuffer (const Whole TexWidth, const Whole TexHeight)
 Size dimensions constructor. More...
 
 TextureBuffer (const TextureBuffer &Other)
 Copy constructor. More...
 
 ~TextureBuffer ()
 Class destructor.
 
ImageGenerateImage (const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Creates an Image from this buffer. More...
 
TextureGenerateTexture (const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Creates a Texture from this buffer. More...
 
ColourChannelType GetAlphaByte (const Whole X, const Whole Y) const
 Gets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Real GetAlphaReal (const Whole X, const Whole Y) const
 Gets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
ColourChannelType GetBlueByte (const Whole X, const Whole Y) const
 Gets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Real GetBlueReal (const Whole X, const Whole Y) const
 Gets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Whole GetByteSize () const
 Gets the size of the internal buffer in bytes. More...
 
ColourChannelType GetGreenByte (const Whole X, const Whole Y) const
 Gets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Real GetGreenReal (const Whole X, const Whole Y) const
 Gets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Whole GetHeight () const
 Get the pixel height of this texture. More...
 
ColourValue GetPixel (const Whole X, const Whole Y) const
 Get the colour of a pixel at the specified point.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Whole GetPixelCount () const
 Gets the number of pixels in this texture. More...
 
ColourChannelType GetRedByte (const Whole X, const Whole Y) const
 Gets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Real GetRedReal (const Whole X, const Whole Y) const
 Gets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
Whole GetSubChannelCount () const
 Gets the number of colour channels among all the pixels in this texture. More...
 
Whole GetWidth () const
 Get the pixel width of this texture. More...
 
void SetAlphaByte (const Whole X, const Whole Y, const ColourChannelType Alpha)
 Sets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetAlphaReal (const Whole X, const Whole Y, const Real Alpha)
 Sets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 
void SetBlueByte (const Whole X, const Whole Y, const ColourChannelType Blue)
 Sets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetBlueReal (const Whole X, const Whole Y, const Real Blue)
 Sets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 
void SetData (const TextureBuffer &Other)
 Copies image data from another buffer into this buffer. More...
 
void SetGreenByte (const Whole X, const Whole Y, const ColourChannelType Green)
 Sets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetGreenReal (const Whole X, const Whole Y, const Real Green)
 Sets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 
void SetPixel (const Whole X, const Whole Y, const ColourValue &Colour)
 Set colour of a specified pixel using a ColourValue.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetPixelByte (const Whole X, const Whole Y, const ColourChannelType Red, const ColourChannelType Green, const ColourChannelType Blue, const ColourChannelType Alpha=255)
 Set colour of a specified pixel using a 0-255 range.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetPixelReal (const Whole X, const Whole Y, const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Set colour of a specified pixel using a 0.0-1.0 range.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 
void SetRedByte (const Whole X, const Whole Y, const ColourChannelType Red)
 Sets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
void SetRedReal (const Whole X, const Whole Y, const Real Red)
 Sets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.
More...
 

Protected Member Functions

ColourChannelTypeGetPixel (const Whole X, const Whole Y, const UInt16 Component)
 Gets access to the pixel at the specified position in this buffer.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 
const ColourChannelTypeGetPixel (const Whole X, const Whole Y, const UInt16 Component) const
 Gets access to the pixel at the specified position in this buffer.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
More...
 

Protected Attributes

Whole Height
 The size of the texture to be generated on the Y axis. More...
 
ColourChannelTypePixels
 A pointer to the buffer storing all the pixels of this texture buffer. More...
 
Whole Width
 The size of the texture to be generated on the X axis. More...
 

Detailed Description

A convenience buffer that stores pixel colour values of a texture to be generated.

Todo:
Verify byte order and endian-ness isn't an issue on all supported platforms.

Definition at line 86 of file texturebuffer.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::TextureBuffer::TextureBuffer ( const Whole  SquareSize)

Square size constructor.

Parameters
SquareSizeThe width and height of the texture to create. This value will be clamped to be at least 8.

Definition at line 94 of file texturebuffer.cpp.

Mezzanine::Graphics::Procedural::TextureBuffer::TextureBuffer ( const Whole  TexWidth,
const Whole  TexHeight 
)

Size dimensions constructor.

Parameters
TexWidthThe pixel width of the texture to create. This value will be clamped to be at least 8.
TexHeightThe pixel height of the texture to create. This value will be clamped to be at least 8.

Definition at line 109 of file texturebuffer.cpp.

Mezzanine::Graphics::Procedural::TextureBuffer::TextureBuffer ( const TextureBuffer Other)

Copy constructor.

Parameters
OtherThe other TextureBuffer to be copied.

Definition at line 124 of file texturebuffer.cpp.

Member Function Documentation

Image * Mezzanine::Graphics::Procedural::TextureBuffer::GenerateImage ( const Graphics::PixelFormat  Format = Graphics::PF_R8G8B8A8) const

Creates an Image from this buffer.

Remarks
The generated image is not owned by this buffer or anything. It is up to the user/caller of this method to clean it up.
Parameters
FormatThe pixel format for the generated Image. Defaults to: Graphics::PF_R8G8B8A8 (Ideal for PNG).
Returns
Returns a pointer to the converted Image.

Definition at line 186 of file texturebuffer.cpp.

Texture * Mezzanine::Graphics::Procedural::TextureBuffer::GenerateTexture ( const String TexName,
const String TexGroup,
const Graphics::PixelFormat  Format = Graphics::PF_R8G8B8A8 
) const

Creates a Texture from this buffer.

Parameters
TexNameThe name of the Texture to be generated.
TexGroupThe name of the resource group to create the Texture in.
FormatThe pixel format for the generated Texture. Defaults to: Graphics::PF_R8G8B8A8 (Ideal for PNG).
Returns
Returns a pointer to the converted Texture.

Definition at line 194 of file texturebuffer.cpp.

TextureBuffer::ColourChannelType Mezzanine::Graphics::Procedural::TextureBuffer::GetAlphaByte ( const Whole  X,
const Whole  Y 
) const

Gets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a ColourChannelType representing the alpha component of the colour in the specified pixel. Range: [0, 255].

Definition at line 286 of file texturebuffer.cpp.

Real Mezzanine::Graphics::Procedural::TextureBuffer::GetAlphaReal ( const Whole  X,
const Whole  Y 
) const

Gets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a Real representing the alpha component of the colour in the specified pixel. Range: [0.0, 1.0].

Definition at line 289 of file texturebuffer.cpp.

TextureBuffer::ColourChannelType Mezzanine::Graphics::Procedural::TextureBuffer::GetBlueByte ( const Whole  X,
const Whole  Y 
) const

Gets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a ColourChannelType representing the blue component of the colour in the specified pixel. Range: [0, 255].

Definition at line 270 of file texturebuffer.cpp.

Real Mezzanine::Graphics::Procedural::TextureBuffer::GetBlueReal ( const Whole  X,
const Whole  Y 
) const

Gets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a Real representing the blue component of the colour in the specified pixel. Range: [0.0, 1.0].

Definition at line 273 of file texturebuffer.cpp.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::GetByteSize ( ) const

Gets the size of the internal buffer in bytes.

Returns
Returns the size of the buffer containing the pixels of the image in bytes.

Definition at line 183 of file texturebuffer.cpp.

TextureBuffer::ColourChannelType Mezzanine::Graphics::Procedural::TextureBuffer::GetGreenByte ( const Whole  X,
const Whole  Y 
) const

Gets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a ColourChannelType representing the green component of the colour in the specified pixel. Range: [0, 255].

Definition at line 254 of file texturebuffer.cpp.

Real Mezzanine::Graphics::Procedural::TextureBuffer::GetGreenReal ( const Whole  X,
const Whole  Y 
) const

Gets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a Real representing the green component of the colour in the specified pixel. Range: [0.0, 1.0].

Definition at line 257 of file texturebuffer.cpp.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::GetHeight ( ) const

Get the pixel height of this texture.

Returns
Returns a Whole representing the height of this TextureBuffer in pixels.

Definition at line 174 of file texturebuffer.cpp.

TextureBuffer::ColourChannelType & Mezzanine::Graphics::Procedural::TextureBuffer::GetPixel ( const Whole  X,
const Whole  Y,
const UInt16  Component 
)
protected

Gets access to the pixel at the specified position in this buffer.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of the pixel to access.
YThe Y position of the pixel to access.
ComponentThe colour component to access.
Returns
Returns a ColourChannelType reference to the requested component of the requested pixel.

Definition at line 133 of file texturebuffer.cpp.

const TextureBuffer::ColourChannelType & Mezzanine::Graphics::Procedural::TextureBuffer::GetPixel ( const Whole  X,
const Whole  Y,
const UInt16  Component 
) const
protected

Gets access to the pixel at the specified position in this buffer.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of the pixel to access.
YThe Y position of the pixel to access.
ComponentThe colour component to access.
Returns
Returns a const ColourChannelType reference to the requested component of the requested pixel.

Definition at line 142 of file texturebuffer.cpp.

ColourValue Mezzanine::Graphics::Procedural::TextureBuffer::GetPixel ( const Whole  X,
const Whole  Y 
) const

Get the colour of a pixel at the specified point.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a ColourValue containing the colour of the specified pixel.

Definition at line 225 of file texturebuffer.cpp.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::GetPixelCount ( ) const

Gets the number of pixels in this texture.

Returns
Returns the total number of pixels in this texture (width * height).

Definition at line 177 of file texturebuffer.cpp.

TextureBuffer::ColourChannelType Mezzanine::Graphics::Procedural::TextureBuffer::GetRedByte ( const Whole  X,
const Whole  Y 
) const

Gets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a ColourChannelType representing the red component of the colour in the specified pixel. Range: [0, 255].

Definition at line 238 of file texturebuffer.cpp.

Real Mezzanine::Graphics::Procedural::TextureBuffer::GetRedReal ( const Whole  X,
const Whole  Y 
) const

Gets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to retrieve.
YThe Y position of pixel to retrieve.
Returns
Returns a Real representing the red component of the colour in the specified pixel. Range: [0.0, 1.0].

Definition at line 241 of file texturebuffer.cpp.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::GetSubChannelCount ( ) const

Gets the number of colour channels among all the pixels in this texture.

Returns
Returns the total number of colour channels in this texture (PixelCount * 4).

Definition at line 180 of file texturebuffer.cpp.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::GetWidth ( ) const

Get the pixel width of this texture.

Returns
Returns a Whole representing the width of this TextureBuffer in pixels.

Definition at line 171 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetAlphaByte ( const Whole  X,
const Whole  Y,
const ColourChannelType  Alpha 
)

Sets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
AlphaThe amount of alpha colour to be applied to the specified pixel. Range: [0, 255].

Definition at line 276 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetAlphaReal ( const Whole  X,
const Whole  Y,
const Real  Alpha 
)

Sets the alpha colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
AlphaThe amount of alpha colour to be applied to the specified pixel. Range: [0.0, 1.0].

Definition at line 279 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetBlueByte ( const Whole  X,
const Whole  Y,
const ColourChannelType  Blue 
)

Sets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
BlueThe amount of blue colour to be applied to the specified pixel. Range: [0, 255].

Definition at line 260 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetBlueReal ( const Whole  X,
const Whole  Y,
const Real  Blue 
)

Sets the blue colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
BlueThe amount of blue colour to be applied to the specified pixel. Range: [0.0, 1.0].

Definition at line 263 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetData ( const TextureBuffer Other)

Copies image data from another buffer into this buffer.

Parameters
OtherThe other TextureBuffer that will having it's contents copied to this.

Definition at line 154 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetGreenByte ( const Whole  X,
const Whole  Y,
const ColourChannelType  Green 
)

Sets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
GreenThe amount of green colour to be applied to the specified pixel. Range: [0, 255].

Definition at line 244 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetGreenReal ( const Whole  X,
const Whole  Y,
const Real  Green 
)

Sets the green colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
GreenThe amount of green colour to be applied to the specified pixel. Range: [0.0, 1.0].

Definition at line 247 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetPixel ( const Whole  X,
const Whole  Y,
const ColourValue Colour 
)

Set colour of a specified pixel using a ColourValue.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
ColourThe colour to be applied to the specified pixel.

Definition at line 204 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetPixelByte ( const Whole  X,
const Whole  Y,
const ColourChannelType  Red,
const ColourChannelType  Green,
const ColourChannelType  Blue,
const ColourChannelType  Alpha = 255 
)

Set colour of a specified pixel using a 0-255 range.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
RedThe amount of Red colour to be applied to the specified pixel. Range: [0, 255].
GreenThe amount of Green colour to be applied to the specified pixel. Range: [0, 255].
BlueThe amount of Blue colour to be applied to the specified pixel. Range: [0, 255].
AlphaThe amount of Alpha colour to be applied to the specified pixel. Range: [0, 255].

Definition at line 209 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetPixelReal ( const Whole  X,
const Whole  Y,
const Real  Red,
const Real  Green,
const Real  Blue,
const Real  Alpha = 1.0 
)

Set colour of a specified pixel using a 0.0-1.0 range.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
RedThe amount of Red colour to be applied to the specified pixel. Range: [0.0, 1.0].
GreenThe amount of Green colour to be applied to the specified pixel. Range: [0.0, 1.0].
BlueThe amount of Blue colour to be applied to the specified pixel. Range: [0.0, 1.0].
AlphaThe amount of Alpha colour to be applied to the specified pixel. Range: [0.0, 1.0].

Definition at line 217 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetRedByte ( const Whole  X,
const Whole  Y,
const ColourChannelType  Red 
)

Sets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
RedThe amount of red colour to be applied to the specified pixel. Range: [0, 255].

Definition at line 228 of file texturebuffer.cpp.

void Mezzanine::Graphics::Procedural::TextureBuffer::SetRedReal ( const Whole  X,
const Whole  Y,
const Real  Red 
)

Sets the red colour value of a specified pixel.

Exceptions
Ifthe X or Y location go beyond the set size of this texture buffer, then a MM_OUT_OF_BOUNDS_EXCEPTION will be thrown.
Ifany of the colour values passed in are outside of the range of 0.0-1.0, then a PARAMETERS_RANGE_EXCEPTION will be thrown.

Parameters
XThe X position of pixel to change the colour of.
YThe Y position of pixel to change the colour of.
RedThe amount of red colour to be applied to the specified pixel. Range: [0.0, 1.0].

Definition at line 231 of file texturebuffer.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::TextureBuffer::Height
protected

The size of the texture to be generated on the Y axis.

Definition at line 100 of file texturebuffer.h.

ColourChannelType* Mezzanine::Graphics::Procedural::TextureBuffer::Pixels
protected

A pointer to the buffer storing all the pixels of this texture buffer.

Definition at line 94 of file texturebuffer.h.

Whole Mezzanine::Graphics::Procedural::TextureBuffer::Width
protected

The size of the texture to be generated on the X axis.

Definition at line 97 of file texturebuffer.h.


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