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

Draw an ellipse. More...

#include <ProceduralTextureModifiers.h>

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

Public Member Functions

 EllipseTexture (TextureBufferPtr pBuffer)
 Default constructor. More...
 
EllipseTexturesetColour (Ogre::ColourValue colour)
 Set the fill colour of the ellipse. More...
 
EllipseTexturesetColour (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the fill colour of the ellipse. More...
 
EllipseTexturesetRadiusX (size_t radiusx)
 Set the absolute radius of the ellipse on x axis. More...
 
EllipseTexturesetRadiusX (Ogre::Real radiusx)
 Set the relative radius of the ellipse on x axis. More...
 
EllipseTexturesetRadiusY (size_t radiusy)
 Set the absolute radius of the ellipse on y axis. More...
 
EllipseTexturesetRadiusY (Ogre::Real radiusy)
 Set the relative radius of the ellipse on y axis. More...
 
EllipseTexturesetRadius (size_t radiusx, size_t radiusy)
 Set the absolute radius of the ellipse. More...
 
EllipseTexturesetRadius (Ogre::Real radiusx, Ogre::Real radiusy)
 Set the relative radius of the ellipse. More...
 
EllipseTexturesetCenterX (size_t x)
 Set absolute x position of ellipse center point in px. More...
 
EllipseTexturesetCenterX (Ogre::Real x)
 Set relative x position of ellipse center point as Real. More...
 
EllipseTexturesetCenterY (size_t y)
 Set absolute y position of ellipse center point in px. More...
 
EllipseTexturesetCenterY (Ogre::Real y)
 Set relative y position of ellipse center point as Real. More...
 
EllipseTexturesetCenter (Ogre::Vector2 pos, bool relative=true)
 Set the position of ellipse center point. More...
 
EllipseTexturesetCenter (size_t x, size_t y)
 Set the position of ellipse center point. More...
 
EllipseTexturesetCenter (Ogre::Real x, Ogre::Real y, bool relative=true)
 Set the position of ellipse center point. 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

Draw an ellipse.

Draw a filled ellipse on top of previous content.

Example:

dot_texture_33.png

Constructor & Destructor Documentation

◆ EllipseTexture()

Procedural::EllipseTexture::EllipseTexture ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.

References Procedural::TextureBuffer::getHeight(), and Procedural::TextureBuffer::getWidth().

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

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setCenter() [1/3]

EllipseTexture& Procedural::EllipseTexture::setCenter ( Ogre::Real  x,
Ogre::Real  y,
bool  relative = true 
)

Set the position of ellipse center point.

Parameters
xNew relative x position of ellipse center [0.0, 1.0] (default 0.5)
yNew relative y position of ellipse center [0.0, 1.0] (default 0.5)
relativeIf this is set to true (default) the vector data are relative [0.0, 1.0]; else absolut [px]

◆ setCenter() [2/3]

EllipseTexture& Procedural::EllipseTexture::setCenter ( Ogre::Vector2  pos,
bool  relative = true 
)

Set the position of ellipse center point.

Parameters
posVector to the center point of the ellipse (default: x=0.5, y=0.5)
relativeIf this is set to true (default) the vector data are relative [0.0, 1.0]; else absolut [px]

◆ setCenter() [3/3]

EllipseTexture& Procedural::EllipseTexture::setCenter ( size_t  x,
size_t  y 
)

Set the position of ellipse center point.

Parameters
xNew absolute x position of ellipse center (default 1/2 * image width)
yNew absolute y position of ellipse center (default 1/2 * image width)

◆ setCenterX() [1/2]

EllipseTexture& Procedural::EllipseTexture::setCenterX ( Ogre::Real  x)

Set relative x position of ellipse center point as Real.

Parameters
xNew relative x position of ellipse center [0.0, 1.0] (default 0.5)

◆ setCenterX() [2/2]

EllipseTexture& Procedural::EllipseTexture::setCenterX ( size_t  x)

Set absolute x position of ellipse center point in px.

Parameters
xNew absolute x position of ellipse center (default 1/2 * image width)

◆ setCenterY() [1/2]

EllipseTexture& Procedural::EllipseTexture::setCenterY ( Ogre::Real  y)

Set relative y position of ellipse center point as Real.

Parameters
yNew relative y position of ellipse center [0.0, 1.0] (default 0.5)

◆ setCenterY() [2/2]

EllipseTexture& Procedural::EllipseTexture::setCenterY ( size_t  y)

Set absolute y position of ellipse center point in px.

Parameters
yNew absolute y position of ellipse center (default 1/2 * image width)

◆ setColour() [1/2]

EllipseTexture& Procedural::EllipseTexture::setColour ( Ogre::ColourValue  colour)

Set the fill colour of the ellipse.

Parameters
colourNew colour for processing (default Ogre::ColourValue::White)

◆ setColour() [2/2]

EllipseTexture& Procedural::EllipseTexture::setColour ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the fill colour of the ellipse.

Parameters
redRed value of the fill colour [0.0, 1.0] (default 1.0)
greenGreen value of the fill colour [0.0, 1.0] (default 1.0)
blueBlue value of the fill colour [0.0, 1.0] (default 1.0)
alphaAlpha value of the fill colour [0.0, 1.0] (default 1.0)

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setRadius() [1/2]

EllipseTexture& Procedural::EllipseTexture::setRadius ( Ogre::Real  radiusx,
Ogre::Real  radiusy 
)

Set the relative radius of the ellipse.

Parameters
radiusxNew relative radius of the ellipse on x axis [0.0, 1.0] (default 0.5)
radiusyNew relative radius of the ellipse on y axis [0.0, 1.0] (default 0.5)

◆ setRadius() [2/2]

EllipseTexture& Procedural::EllipseTexture::setRadius ( size_t  radiusx,
size_t  radiusy 
)

Set the absolute radius of the ellipse.

Parameters
radiusxNew absolute radius of the ellipse on x axis in px (default 1/2 * image width)
radiusyNew absolute radius of the ellipse on y axis in px (default 1/2 * image width)

◆ setRadiusX() [1/2]

EllipseTexture& Procedural::EllipseTexture::setRadiusX ( Ogre::Real  radiusx)

Set the relative radius of the ellipse on x axis.

Parameters
radiusxNew relative radius of the ellipse on x axis [0.0, 1.0] (default 0.5)

◆ setRadiusX() [2/2]

EllipseTexture& Procedural::EllipseTexture::setRadiusX ( size_t  radiusx)

Set the absolute radius of the ellipse on x axis.

Parameters
radiusxNew absolute radius of the ellipse on x axis in px (default 1/2 * image width)

◆ setRadiusY() [1/2]

EllipseTexture& Procedural::EllipseTexture::setRadiusY ( Ogre::Real  radiusy)

Set the relative radius of the ellipse on y axis.

Parameters
radiusyNew relative radius of the ellipse on y axis [0.0, 1.0] (default 0.5)

◆ setRadiusY() [2/2]

EllipseTexture& Procedural::EllipseTexture::setRadiusY ( size_t  radiusy)

Set the absolute radius of the ellipse on y axis.

Parameters
radiusyNew absolute radius of the ellipse on y axis in px (default 1/2 * image width)

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::EllipseTexture::process
TextureBufferPtr process()
Run image manipulation.
Procedural::EllipseTexture::setRadiusX
EllipseTexture & setRadiusX(size_t radiusx)
Set the absolute radius of the ellipse on x axis.
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue
Procedural::EllipseTexture::setRadiusY
EllipseTexture & setRadiusY(size_t radiusy)
Set the absolute radius of the ellipse on y axis.
Procedural::Solid
Fills full image with given colour.
Definition: ProceduralTextureGenerator.h:563
Procedural::EllipseTexture::setColour
EllipseTexture & setColour(Ogre::ColourValue colour)
Set the fill colour of the ellipse.
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::EllipseTexture
Draw an ellipse.
Definition: ProceduralTextureModifiers.h:1395
Procedural::Solid::process
TextureBufferPtr process()
Run image generation.
Procedural::Solid::setColour
Solid & setColour(Ogre::ColourValue colour)
Sets the fill colour of the image.