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

Draw a cycloid. More...

#include <ProceduralTextureModifiers.h>

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

Public Types

enum  CYCLOID_TYPE {
  HYPOCYCLOID, HYPOTROCHOID, EPICYCLOID, EPITROCHOID,
  ROSE_CURVE, LISSAJOUS_CURVE
}
 Which type of cycloid should be painted. More...
 
enum  CYCLOID_PARAMETER {
  PARAMETER_R, PARAMETER_r, PARAMETER_d, PARAMETER_e,
  PARAMETER_k
}
 Which parameter should be set. More...
 

Public Member Functions

 Cycloid (TextureBufferPtr pBuffer)
 Default constructor. More...
 
CycloidsetType (CYCLOID_TYPE type)
 Set the algorithm to for drawing. More...
 
CycloidsetColour (Ogre::ColourValue colour)
 Set the drawing colour for cycloid structure. More...
 
CycloidsetColour (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the drawing colour for cycloid structure. More...
 
CycloidsetCenterX (Ogre::Real centerx)
 Set the relative center position of the cycloid main circle on x axis. More...
 
CycloidsetCenterY (Ogre::Real centery)
 Set the relative center position of the cycloid main circle on y axis. More...
 
CycloidsetParameter (CYCLOID_PARAMETER paramType, Ogre::Real value)
 Set the parameter value. More...
 
CycloidsetPenSize (Ogre::uint size)
 Set the size for the pen to draw. 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 a cycloid.

Draw a cycloid on top of previous content.

Example:

dot_texture_30.png

Cycloid types
CYCLOID_TYPENameImage
HYPOCYCLOID

Hypocycloid

http://en.wikipedia.org/wiki/Hypocycloid

HYPOTROCHOID

Hypotrochoid

http://en.wikipedia.org/wiki/Hypotrochoid

EPICYCLOID

Epicycloid

http://en.wikipedia.org/wiki/Epicycloid

EPITROCHOID

Epitrochoid

http://en.wikipedia.org/wiki/Epitrochoid

ROSE_CURVE

Rose curve

http://en.wikipedia.org/wiki/Rose_curve

LISSAJOUS_CURVE

Lissajous curve

http://en.wikipedia.org/wiki/Lissajous_curve

Default parameters
NameParameter RParameter rParameter dParameter eParameter k
Hypocycloid3/6 * Size1/6 * Sizeunsusedunsusedk = R / r3
Hypotrochoid5/14 * Size3/14 * Size5/14 * Size2
Epicycloid3/10 * Size1/10 * Sizeunsused3
Epitrochoid3/10 * Size1/10 * Size1/20 * Size3
Rose curve1/2 * Size41k = r / d4
Lissajous curve1/2 * Size54π/25/4

Member Enumeration Documentation

◆ CYCLOID_PARAMETER

Which parameter should be set.

Enumerator
PARAMETER_R 

Set parameter R.

PARAMETER_r 

Set parameter r.

PARAMETER_d 

Set parameter d.

PARAMETER_e 

Set parameter e.

PARAMETER_k 

Set parameter k.

◆ CYCLOID_TYPE

Which type of cycloid should be painted.

Enumerator
HYPOCYCLOID 

Draw a Hypocycloid.

HYPOTROCHOID 

Draw a Hypotrochoid.

EPICYCLOID 

Draw a Epicycloid.

EPITROCHOID 

Draw a Epitrochoid.

ROSE_CURVE 

Draw a Rose curve.

LISSAJOUS_CURVE 

Draw a Lissajous curve.

Constructor & Destructor Documentation

◆ Cycloid()

Procedural::Cycloid::Cycloid ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the 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::Cycloid::process ( )
virtual

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setCenterX()

Cycloid& Procedural::Cycloid::setCenterX ( Ogre::Real  centerx)

Set the relative center position of the cycloid main circle on x axis.

Parameters
centerxNew relative center of the cycloid main circle [0.0, 1.0] (default 0.5)

◆ setCenterY()

Cycloid& Procedural::Cycloid::setCenterY ( Ogre::Real  centery)

Set the relative center position of the cycloid main circle on y axis.

Parameters
centeryNew relative center of the cycloid main circle [0.0, 1.0] (default 0.5)

◆ setColour() [1/2]

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

Set the drawing colour for cycloid structure.

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

◆ setColour() [2/2]

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

Set the drawing colour for cycloid structure.

Parameters
redRed value of drawing colour [0.0, 1.0] (default 1.0)
greenGreen value of drawing colour [0.0, 1.0] (default 1.0)
blueBlue value of drawing colour [0.0, 1.0] (default 1.0)
alphaAlpha value of drawing 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

◆ setParameter()

Cycloid& Procedural::Cycloid::setParameter ( CYCLOID_PARAMETER  paramType,
Ogre::Real  value 
)

Set the parameter value.

Parameters
paramTypeSelection which parameter should be set
valueNew value for selected parameter
See also
Default parameters for default values
Note
Unsused paramerters will be ignored. Setting k parameter calculates the first used parameter. For example k = R / r will calculate R by R = k * r (also r from r = k * d).

◆ setPenSize()

Cycloid& Procedural::Cycloid::setPenSize ( Ogre::uint  size)

Set the size for the pen to draw.

Parameters
sizeNew size for the drawing pen (default 1)

◆ setType()

Cycloid& Procedural::Cycloid::setType ( CYCLOID_TYPE  type)

Set the algorithm to for drawing.

Parameters
typeNew algorithm to draw (default HYPOCYCLOID)
Note
Call this function on first place! setType resets all numerical parameter to special defaults according on used algorithm.

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::Cycloid::setType
Cycloid & setType(CYCLOID_TYPE type)
Set the algorithm to for drawing.
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue
Procedural::Cycloid::setPenSize
Cycloid & setPenSize(Ogre::uint size)
Set the size for the pen to draw.
Procedural::Cycloid::setColour
Cycloid & setColour(Ogre::ColourValue colour)
Set the drawing colour for cycloid structure.
Procedural::Solid
Fills full image with given colour.
Definition: ProceduralTextureGenerator.h:563
Procedural::Cycloid::process
TextureBufferPtr process()
Run image manipulation.
Procedural::Cycloid::HYPOTROCHOID
@ HYPOTROCHOID
Draw a Hypotrochoid.
Definition: ProceduralTextureModifiers.h:1110
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Solid::process
TextureBufferPtr process()
Run image generation.
Procedural::Solid::setColour
Solid & setColour(Ogre::ColourValue colour)
Sets the fill colour of the image.
Procedural::Cycloid
Draw a cycloid.
Definition: ProceduralTextureModifiers.h:1101