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

Load an image from a resource. More...

#include <ProceduralTextureGenerator.h>

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

Public Member Functions

 Image (TextureBufferPtr pBuffer)
 Default constructor. More...
 
ImagesetFile (Ogre::String filename, Ogre::String groupname=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
 Set the colour of the background. More...
 
TextureBufferPtr process ()
 Run image generation. 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

Load an image from a resource.

Try to load an image from a resource.

Example:

Procedural::TextureBuffer bufferImage(256);
Procedural::Image(&bufferImage).setFile("red_brick.jpg").process();

Constructor & Destructor Documentation

◆ Image()

Procedural::Image::Image ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to store the generated image.

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::Image::process ( )
virtual

Run image generation.

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

Implements Procedural::TextureProcessing.

◆ setFile()

Image& Procedural::Image::setFile ( Ogre::String  filename,
Ogre::String  groupname = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME 
)

Set the colour of the background.

Parameters
filenameName of an image file to load.
groupnameName of the resource group to search for the image

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

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::Image
Load an image from a resource.
Definition: ProceduralTextureGenerator.h:334
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.