RigsofRods
Soft-body Physics Simulation
Public Types | Public Member Functions | Private Member Functions | Private Attributes
SkyX::ColorGradient Class Reference

#include <ColorGradient.h>

Public Types

typedef std::pair< Ogre::Vector3, Ogre::Real > ColorFrame
 Color frame type definition ColorFrame.first: Colour value ColorFrame.second: Position in the gradient [0,1] range. More...
 

Public Member Functions

 ColorGradient ()
 Constructor. More...
 
 ~ColorGradient ()
 Destructor. More...
 
void addCFrame (const ColorFrame &CFrame)
 Add color frame. More...
 
void clear ()
 Clear color gradient. More...
 
const Ogre::Vector3 getColor (const Ogre::Real &p) const
 Get color value. More...
 

Private Member Functions

const bool _checkBounds () const
 Check bounds. More...
 

Private Attributes

bool mMalFormed
 Mal formed color gradient? More...
 
std::vector< ColorFrameCFrameVector
 Color frame vector. More...
 

Detailed Description

Definition at line 31 of file ColorGradient.h.

Member Typedef Documentation

◆ ColorFrame

typedef std::pair<Ogre::Vector3, Ogre::Real> SkyX::ColorGradient::ColorFrame

Color frame type definition ColorFrame.first: Colour value ColorFrame.second: Position in the gradient [0,1] range.

Definition at line 38 of file ColorGradient.h.

Constructor & Destructor Documentation

◆ ColorGradient()

SkyX::ColorGradient::ColorGradient ( )

Constructor.

Definition at line 28 of file ColorGradient.cpp.

◆ ~ColorGradient()

SkyX::ColorGradient::~ColorGradient ( )

Destructor.

Definition at line 33 of file ColorGradient.cpp.

Member Function Documentation

◆ _checkBounds()

const bool SkyX::ColorGradient::_checkBounds ( ) const
private

Check bounds.

Returns
false if the Color gradient is mal-formed

Definition at line 86 of file ColorGradient.cpp.

+ Here is the caller graph for this function:

◆ addCFrame()

void SkyX::ColorGradient::addCFrame ( const ColorFrame CFrame)
inline

Add color frame.

Parameters
CFrameColor frame

Definition at line 51 of file ColorGradient.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void SkyX::ColorGradient::clear ( )
inline

Clear color gradient.

Definition at line 60 of file ColorGradient.h.

◆ getColor()

const Ogre::Vector3 SkyX::ColorGradient::getColor ( const Ogre::Real &  p) const

Get color value.

Parameters
pThe gradient point in [0,1] range
Returns
Color at the given gradient position

Definition at line 37 of file ColorGradient.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ CFrameVector

std::vector<ColorFrame> SkyX::ColorGradient::CFrameVector
private

Color frame vector.

Definition at line 81 of file ColorGradient.h.

◆ mMalFormed

bool SkyX::ColorGradient::mMalFormed
private

Mal formed color gradient?

Definition at line 78 of file ColorGradient.h.


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