Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Procedural::Blit Class Reference

copies a part of the input buffer towards the current buffer. More...

#include <ProceduralTextureModifiers.h>

Inheritance diagram for Procedural::Blit:
Inheritance graph
[legend]

Public Member Functions

 Blit (TextureBufferPtr pBuffer)
 Default constructor. More...
 
BlitsetInputBuffer (TextureBufferPtr inputBuffer)
 Sets the texture buffer that must be copied towards the current texture buffer. More...
 
BlitsetInputRect (Ogre::RealRect rect, bool relative=true)
 Set the full rectangle coordinates of the input buffer to copy. More...
 
BlitsetInputRect (Ogre::Rect rect)
 Set the full rectangle coordinates of the input buffer to copy. More...
 
BlitsetInputRect (Ogre::Vector2 pos1, Ogre::Vector2 pos2, bool relative=true)
 Set the full rectangle coordinates of the input buffer to copy. More...
 
BlitsetInputRect (size_t x1, size_t y1, size_t x2, size_t y2)
 Set the full rectangle coordinates of the input buffer to copy. More...
 
BlitsetInputRect (Ogre::Real x1, Ogre::Real y1, Ogre::Real x2, Ogre::Real y2)
 Set the full rectangle coordinates of the input buffer to copy. More...
 
BlitsetOutputRect (Ogre::RealRect rect, bool relative=true)
 Set the full rectangle coordinates of the output buffer where the input is copied to. More...
 
BlitsetOutputRect (Ogre::Rect rect)
 Set the full rectangle coordinates of the output buffer where the input is copied to. More...
 
BlitsetOutputRect (Ogre::Vector2 pos1, Ogre::Vector2 pos2, bool relative=true)
 Set the full rectangle coordinates of the output buffer where the input is copied to. More...
 
BlitsetOutputRect (size_t x1, size_t y1, size_t x2, size_t y2)
 Set the full rectangle coordinates of the output buffer where the input is copied to. More...
 
BlitsetOutputRect (Ogre::Real x1, Ogre::Real y1, Ogre::Real x2, Ogre::Real y2)
 Set the full rectangle coordinates of the output buffer where the input is copied to. More...
 
TextureBufferPtr process ()
 Run image manipulation. More...
 
Ogre::String getName ()
 Get name of the filter as string. More...
 
void setLog (bool enable=true)
 Enable/Disable logging. More...
 

Protected Member Functions

void logMsg (Ogre::String msg)
 

Protected Attributes

TextureBufferPtr mBuffer
 
Ogre::String mName
 
bool mLog
 

Detailed Description

copies a part of the input buffer towards the current buffer.

Example:

Procedural::TextureBuffer bufferImage(256);
Procedural::Image(&bufferImage).setFile("red_brick.jpg").process();
Procedural::TextureBuffer bufferGradient(256);
Procedural::Blit(&bufferImage).setInputBuffer(&bufferGradient).setInputRect(0.0f, 0.0f, 0.5f, 0.5f).setOutputRect(0.25f, 0.25f, 0.75f, 0.75f).process();

dot_texture_31.png

Constructor & Destructor Documentation

◆ Blit()

Procedural::Blit::Blit ( TextureBufferPtr  pBuffer)

Member Function Documentation

◆ getName()

Ogre::String Procedural::TextureProcessing::getName ( )
inherited

Get name of the filter as string.

◆ logMsg()

void Procedural::TextureProcessing::logMsg ( Ogre::String  msg)
protectedinherited

◆ process()

TextureBufferPtr Procedural::Blit::process ( )
virtual

Run image manipulation.

Returns
Pointer to image buffer which has been set in the constructor.

Implements Procedural::TextureProcessing.

◆ setInputBuffer()

Blit& Procedural::Blit::setInputBuffer ( TextureBufferPtr  inputBuffer)

Sets the texture buffer that must be copied towards the current texture buffer.

Parameters
inputBufferPointer on image where to copy from

◆ setInputRect() [1/5]

Blit& Procedural::Blit::setInputRect ( Ogre::Real  x1,
Ogre::Real  y1,
Ogre::Real  x2,
Ogre::Real  y2 
)

Set the full rectangle coordinates of the input buffer to copy.

Parameters
x1New relative x position of rectangle start [0.0, 1.0] (default 0.0)
y1New relative y position of rectangle start [0.0, 1.0] (default 0.0)
x2New relative x position of rectangle end [0.0, 1.0] (default 1.0)
y2New relative y position of rectangle end [0.0, 1.0] (default 1.0)

◆ setInputRect() [2/5]

Blit& Procedural::Blit::setInputRect ( Ogre::RealRect  rect,
bool  relative = true 
)

Set the full rectangle coordinates of the input buffer to copy.

Parameters
rectFull rectangle description (default: left=0.0, top=0.0, right=1.0, bottom=1.0)
relativeIf this is set to true (default) the rectangle data are relative [0.0, 1.0]; else absolut [px]

◆ setInputRect() [3/5]

Blit& Procedural::Blit::setInputRect ( Ogre::Rect  rect)

Set the full rectangle coordinates of the input buffer to copy.

Parameters
rectFull absolute rectangle description (default: left=0, top=0, right=image width, bottom=image height)

◆ setInputRect() [4/5]

Blit& Procedural::Blit::setInputRect ( Ogre::Vector2  pos1,
Ogre::Vector2  pos2,
bool  relative = true 
)

Set the full rectangle coordinates of the input buffer to copy.

Parameters
pos1Vector to top left start point of the rectangle (default: x=0.0, y=0.0)
pos2Vector to bottom right end point of the rectangle (default: x=1.0, y=1.0)
relativeIf this is set to true (default) the vector data are relative [0.0, 1.0]; else absolut [px]

◆ setInputRect() [5/5]

Blit& Procedural::Blit::setInputRect ( size_t  x1,
size_t  y1,
size_t  x2,
size_t  y2 
)

Set the full rectangle coordinates of the input buffer to copy.

Parameters
x1New absolute x position of rectangle start (default 0)
y1New absolute y position of rectangle start (default 0)
x2New absolute x position of rectangle end (default: image width)
y2New absolute y position of rectangle end (default: image height)

◆ setLog()

void Procedural::TextureProcessing::setLog ( bool  enable = true)
inherited

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setOutputRect() [1/5]

Blit& Procedural::Blit::setOutputRect ( Ogre::Real  x1,
Ogre::Real  y1,
Ogre::Real  x2,
Ogre::Real  y2 
)

Set the full rectangle coordinates of the output buffer where the input is copied to.

Parameters
x1New relative x position of rectangle start [0.0, 1.0] (default 0.0)
y1New relative y position of rectangle start [0.0, 1.0] (default 0.0)
x2New relative x position of rectangle end [0.0, 1.0] (default 1.0)
y2New relative y position of rectangle end [0.0, 1.0] (default 1.0)

◆ setOutputRect() [2/5]

Blit& Procedural::Blit::setOutputRect ( Ogre::RealRect  rect,
bool  relative = true 
)

Set the full rectangle coordinates of the output buffer where the input is copied to.

Parameters
rectFull rectangle description (default: left=0.0, top=0.0, right=1.0, bottom=1.0)
relativeIf this is set to true (default) the rectangle data are relative [0.0, 1.0]; else absolut [px]

◆ setOutputRect() [3/5]

Blit& Procedural::Blit::setOutputRect ( Ogre::Rect  rect)

Set the full rectangle coordinates of the output buffer where the input is copied to.

Parameters
rectFull absolute rectangle description (default: left=0, top=0, right=image width, bottom=image height)

◆ setOutputRect() [4/5]

Blit& Procedural::Blit::setOutputRect ( Ogre::Vector2  pos1,
Ogre::Vector2  pos2,
bool  relative = true 
)

Set the full rectangle coordinates of the output buffer where the input is copied to.

Parameters
pos1Vector to top left start point of the rectangle (default: x=0.0, y=0.0)
pos2Vector to bottom right end point of the rectangle (default: x=1.0, y=1.0)
relativeIf this is set to true (default) the vector data are relative [0.0, 1.0]; else absolut [px]

◆ setOutputRect() [5/5]

Blit& Procedural::Blit::setOutputRect ( size_t  x1,
size_t  y1,
size_t  x2,
size_t  y2 
)

Set the full rectangle coordinates of the output buffer where the input is copied to.

Parameters
x1New absolute x position of rectangle start (default 0)
y1New absolute y position of rectangle start (default 0)
x2New absolute x position of rectangle end (default: image width)
y2New absolute y position of rectangle end (default: image height)

Member Data Documentation

◆ mBuffer

TextureBufferPtr Procedural::TextureProcessing::mBuffer
protectedinherited

◆ mLog

bool Procedural::TextureProcessing::mLog
protectedinherited

◆ mName

Ogre::String Procedural::TextureProcessing::mName
protectedinherited

The documentation for this class was generated from the following file:
Procedural::Image::process
TextureBufferPtr process()
Run image generation.
Procedural::Blit
copies a part of the input buffer towards the current buffer.
Definition: ProceduralTextureModifiers.h:294
Procedural::Image
Load an image from a resource.
Definition: ProceduralTextureGenerator.h:334
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue::Black
static const ColourValue Black
Procedural::Gradient::process
TextureBufferPtr process()
Run image generation.
Procedural::Gradient::setColours
Gradient & setColours(Ogre::ColourValue colourA, Ogre::ColourValue colourB, Ogre::ColourValue colourC, Ogre::ColourValue colourD)
Sets the colours of the image corners.
Procedural::Blit::setOutputRect
Blit & setOutputRect(Ogre::RealRect rect, bool relative=true)
Set the full rectangle coordinates of the output buffer where the input is copied to.
Procedural::Blit::setInputRect
Blit & setInputRect(Ogre::RealRect rect, bool relative=true)
Set the full rectangle coordinates of the input buffer to copy.
Ogre::ColourValue::Blue
static const ColourValue Blue
Procedural::Blit::setInputBuffer
Blit & setInputBuffer(TextureBufferPtr inputBuffer)
Sets the texture buffer that must be copied towards the current texture buffer.
Procedural::Gradient
Fills full image with given colour gradients.
Definition: ProceduralTextureGenerator.h:229
Procedural::Blit::process
TextureBufferPtr process()
Run image manipulation.
Ogre::ColourValue::Green
static const ColourValue Green
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Image::setFile
Image & setFile(Ogre::String filename, Ogre::String groupname=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Set the colour of the background.