40 #ifndef _colourvalue_cpp
41 #define _colourvalue_cpp
43 #include "colourvalue.h"
44 #include "stringtool.h"
88 Ogre::ColourValue OgreColour;
135 ( this->BlueChannel + OtherColor.
BlueChannel ) * 0.5,
136 ( this->AlphaChannel + OtherColor.
AlphaChannel ) * 0.5 );
190 {
return ColourValue(0.980392,0.921568,0.843137,1.0); }
202 {
return ColourValue(0.960784,0.960784,0.862745,1.0); }
217 {
return ColourValue(0.541176,0.168627,0.886274,1.0); }
220 {
return ColourValue(0.647058,0.164705,0.164705,1.0); }
223 {
return ColourValue(0.870588,0.721568,0.529411,1.0); }
226 {
return ColourValue(0.372549,0.619607,0.627450,1.0); }
232 {
return ColourValue(0.823529,0.411764,0.117647,1.0); }
238 {
return ColourValue(0.392116,0.584313,0.929411,1.0); }
244 {
return ColourValue(0.862745,0.078431,0.235294,1.0); }
256 {
return ColourValue(0.721568,0.525490,0.043137,1.0); }
259 {
return ColourValue(0.662745,0.662745,0.662745,1.0); }
265 {
return ColourValue(0.741176,0.717647,0.419607,1.0); }
271 {
return ColourValue(0.333333,0.419607,0.184313,1.0); }
283 {
return ColourValue(0.913725,0.588235,0.478431,1.0); }
286 {
return ColourValue(0.560784,0.737254,0.560784,1.0); }
289 {
return ColourValue(0.282352,0.239215,0.545098,1.0); }
292 {
return ColourValue(0.184313,0.309803,0.309803,1.0); }
307 {
return ColourValue(0.411764,0.411764,0.411764,1.0); }
313 {
return ColourValue(0.698039,0.133333,0.133333,1.0); }
319 {
return ColourValue(0.133333,0.545098,0.133333,1.0); }
325 {
return ColourValue(0.862745,0.862745,0.862745,1.0); }
334 {
return ColourValue(0.854901,0.647058,0.125490,1.0); }
337 {
return ColourValue(0.501960,0.501960,0.501960,1.0); }
352 {
return ColourValue(0.803921,0.360784,0.360784,1.0); }
361 {
return ColourValue(0.941176,0.901960,0.549019,1.0); }
364 {
return ColourValue(0.901960,0.901960,0.980392,1.0); }
376 {
return ColourValue(0.678431,0.847058,0.901960,1.0); }
379 {
return ColourValue(0.941176,0.501960,0.501960,1.0); }
385 {
return ColourValue(0.980392,0.980392,0.823529,1.0); }
388 {
return ColourValue(0.827450,0.827450,0.827450,1.0); }
391 {
return ColourValue(0.564705,0.933333,0.564705,1.0); }
400 {
return ColourValue(0.125490,0.698039,0.666666,1.0); }
403 {
return ColourValue(0.529411,0.807843,0.980392,1.0); }
409 {
return ColourValue(0.690196,0.768627,0.870588,1.0); }
418 {
return ColourValue(0.196078,0.803921,0.196078,1.0); }
421 {
return ColourValue(0.980392,0.941176,0.901960,1.0); }
436 {
return ColourValue(0.729411,0.333333,0.827450,1.0); }
439 {
return ColourValue(0.576470,0.439215,0.858823,1.0); }
442 {
return ColourValue(0.235294,0.701960,0.443137,1.0); }
445 {
return ColourValue(0.482352,0.407843,0.933333,1.0); }
454 {
return ColourValue(0.780392,0.082352,0.521568,1.0); }
457 {
return ColourValue(0.098039,0.098039,0.439215,1.0); }
475 {
return ColourValue(0.992156,0.960784,0.901960,1.0); }
481 {
return ColourValue(0.419607,0.556862,0.137254,1.0); }
490 {
return ColourValue(0.854901,0.439215,0.839215,1.0); }
493 {
return ColourValue(0.933333,0.909803,0.666666,1.0); }
496 {
return ColourValue(0.596078,0.984313,0.596078,1.0); }
499 {
return ColourValue(0.686274,0.933333,0.933333,1.0); }
502 {
return ColourValue(0.858823,0.439215,0.576470,1.0); }
511 {
return ColourValue(0.803921,0.521568,0.247058,1.0); }
517 {
return ColourValue(0.866666,0.627450,0.866666,1.0); }
520 {
return ColourValue(0.690196,0.878431,0.901960,1.0); }
529 {
return ColourValue(0.737254,0.560784,0.560784,1.0); }
532 {
return ColourValue(0.254901,0.411764,0.882352,1.0); }
535 {
return ColourValue(0.545098,0.270588,0.074509,1.0); }
538 {
return ColourValue(0.980392,0.501960,0.447058,1.0); }
541 {
return ColourValue(0.956862,0.643137,0.376470,1.0); }
544 {
return ColourValue(0.180392,0.545098,0.341176,1.0); }
550 {
return ColourValue(0.627450,0.311568,0.176470,1.0); }
553 {
return ColourValue(0.752941,0.752941,0.752941,1.0); }
556 {
return ColourValue(0.529411,0.807843,0.921568,1.0); }
559 {
return ColourValue(0.415686,0.352941,0.803921,1.0); }
562 {
return ColourValue(0.439215,0.501960,0.564705,1.0); }
571 {
return ColourValue(0.274509,0.509803,0.705882,1.0); }
574 {
return ColourValue(0.823529,0.705882,0.549019,1.0); }
580 {
return ColourValue(0.847058,0.749019,0.847058,1.0); }
586 {
return ColourValue(0.250980,0.878431,0.815686,1.0); }
589 {
return ColourValue(0.933333,0.509803,0.933333,1.0); }
592 {
return ColourValue(0.960784,0.870588,0.701960,1.0); }
598 {
return ColourValue(0.960784,0.960784,0.960784,1.0); }
604 {
return ColourValue(0.603921,0.803921,0.196078,1.0); }
619 if( VersionAttr && RAttr && BAttr && GAttr && AAttr)
652 {
return String(
"ColourValue"); }
static ColourValue Silver()
Creates a ColourValue representing the colour Silver.
std::ostream & operator<<(std::ostream &stream, const Mezzanine::LinearInterpolator< T > &Lint)
Used to Serialize an Mezzanine::LinearInterpolator to a human readable stream.
static ColourValue MediumVioletRed()
Creates a ColourValue representing the colour MediumVioletRed.
static ColourValue NavajoWhite()
Creates a ColourValue representing the colour NavajoWhite.
static ColourValue DarkOrchid()
Creates a ColourValue representing the colour DarkOrchid.
static ColourValue DarkSeaGreen()
Creates a ColourValue representing the colour DarkSeaGreen.
Attribute AppendAttribute(const Char8 *Name)
Creates an Attribute and puts it at the end of this Nodes attributes.
static ColourValue Gold()
Creates a ColourValue representing the colour Gold.
static ColourValue Khaki()
Creates a ColourValue representing the colour Khaki.
static ColourValue BlueViolet()
Creates a ColourValue representing the colour BlueViolet.
static ColourValue Yellow()
Creates a ColourValue representing the colour Yellow.
static ColourValue DarkGreen()
Creates a ColourValue representing the colour DarkGreen.
A light-weight handle for manipulating attributes in DOM tree.
static ColourValue PaleVioletRed()
Creates a ColourValue representing the colour PaleVioletRed.
static ColourValue Teal()
Creates a ColourValue representing the colour Teal.
static ColourValue LavenderBlush()
Creates a ColourValue representing the colour LavenderBlush.
bool Boole
Generally acts a single bit, true or false.
static ColourValue MidnightBlue()
Creates a ColourValue representing the colour MidnightBlue.
Real GetAlphaChannel() const
Retrieve the Alpha color component.
static ColourValue Thistle()
Creates a ColourValue representing the colour Thistle.
static ColourValue PaleGreen()
Creates a ColourValue representing the colour PaleGreen.
static ColourValue BurlyWood()
Creates a ColourValue representing the colour BurlyWood.
static ColourValue LemonChiffon()
Creates a ColourValue representing the colour LemonChiffon.
static ColourValue MediumPurple()
Creates a ColourValue representing the colour MediumPurple.
static ColourValue PeachPuff()
Creates a ColourValue representing the colour PeachPuff.
static ColourValue DarkTurquoise()
Creates a ColourValue representing the colour DarkTurquoise.
static ColourValue Wheat()
Creates a ColourValue representing the colour Wheat.
static ColourValue Blue()
Creates a ColourValue representing the colour Blue.
static ColourValue MistyRose()
Creates a ColourValue representing the colour MistyRose.
Real GetGreenChannel() const
Retrieve the Green color component.
static ColourValue Moccasin()
Creates a ColourValue representing the colour Moccasin.
static ColourValue RosyBrown()
Creates a ColourValue representing the colour RosyBrown.
static ColourValue LightYellow()
Creates a ColourValue representing the colour LightYellow.
static ColourValue YellowGreen()
Creates a ColourValue representing the colour YellowGreen.
static ColourValue SpringGreen()
Creates a ColourValue representing the colour SpringGreen.
static ColourValue MediumOrchid()
Creates a ColourValue representing the colour MediumOrchid.
static ColourValue MediumSeaGreen()
Creates a ColourValue representing the colour MediumSeaGreen.
ColourValue & operator+=(const ColourValue &Colour)
Addition Operator.
static ColourValue LightPink()
Creates a ColourValue representing the colour LightPink.
static String GetSerializableName()
Get the name of the the XML tag this class will leave behind as its instances are serialized...
static ColourValue Tan()
Creates a ColourValue representing the colour Tan.
static ColourValue Maroon()
Creates a ColourValue representing the colour Maroon.
static ColourValue DarkCyan()
Creates a ColourValue representing the colour DarkCyan.
static ColourValue Pink()
Creates a ColourValue representing the colour Pink.
static ColourValue MediumSpringGreen()
Creates a ColourValue representing the colour MediumSpringGreen.
static ColourValue Aquamarine()
Creates a ColourValue representing the colour Aquamarine.
static ColourValue Coral()
Creates a ColourValue representing the colour Coral.
static ColourValue Turquoise()
Creates a ColourValue representing the colour Turquoise.
static ColourValue Aqua()
Creates a ColourValue representing the colour Aqua.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
static ColourValue PapayaWhip()
Creates a ColourValue representing the colour PapayaWhip.
static ColourValue Cyan()
Creates a ColourValue representing the colour Cyan.
std::ostream & Serialize(std::ostream &Stream, const T &Converted, const String &Indent=String(""))
Convert any class that supports serialization or has a serializer to a string of chars in a stream...
static ColourValue MediumAquamarine()
Creates a ColourValue representing the colour MediumAquamarine.
static ColourValue FireBrick()
Creates a ColourValue representing the colour FireBrick.
static ColourValue Beige()
Creates a ColourValue representing the colour Beige.
static ColourValue DarkOliveGreen()
Creates a ColourValue representing the colour DarkOliveGreen.
static ColourValue GreenYellow()
Creates a ColourValue representing the colour GreenYellow.
Thrown when a version is accessed/parsed/required and it cannot work correctly or is missing...
static ColourValue DodgerBlue()
Creates a ColourValue representing the colour DodgerBlue.
static ColourValue White()
Creates a ColourValue representing the colour White.
static ColourValue DeepPink()
Creates a ColourValue representing the colour DeepPink.
static ColourValue Sienna()
Creates a ColourValue representing the colour Sienna.
static ColourValue DarkGoldenRod()
Creates a ColourValue representing the colour DarkGoldenRod.
static ColourValue MediumTurquoise()
Creates a ColourValue representing the colour MediumTurquoise.
static ColourValue DimGray()
Creates a ColourValue representing the colour DimGray.
static ColourValue Black()
Creates a ColourValue representing the colour Black.
Boole operator==(const ColourValue &Colour) const
Equality Comparison Operator.
void SetBlueChannel(const Real Blue)
Set the Blue component of this color.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
static ColourValue Lavender()
Creates a ColourValue representing the colour Lavender.
Real GetBlueChannel() const
Retrieve the Blue color component.
static ColourValue HoneyDew()
Creates a ColourValue representing the colour HoneyDew.
This implements the exception hiearchy for Mezzanine.
~ColourValue()
Class destructor.
static ColourValue LightGreen()
Creates a ColourValue representing the colour LightGreen.
static ColourValue Olive()
Creates a ColourValue representing the colour Olive.
static ColourValue IndianRed()
Creates a ColourValue representing the colour IndianRed.
ColourValue Average(const ColourValue &OtherColor) const
Get the color that is the average of this and another color.
static ColourValue Crimson()
Creates a ColourValue representing the colour Crimson.
static ColourValue LightGray()
Creates a ColourValue representing the colour LightGray.
static ColourValue HotPink()
Creates a ColourValue representing the colour HotPink.
static ColourValue Salmon()
Creates a ColourValue representing the colour Salmon.
static ColourValue SlateGray()
Creates a ColourValue representing the colour SlateGray.
static ColourValue SeaGreen()
Creates a ColourValue representing the colour SeaGreen.
Real GetRedChannel() const
Retrieve the Red color component.
ColourValue operator-(const ColourValue &Colour)
Subtraction Operator.
static ColourValue Green()
Creates a ColourValue representing the colour Green.
float Real
A Datatype used to represent a real floating point number.
The interface for serialization.
static ColourValue MintCream()
Creates a ColourValue representing the colour MintCream.
static ColourValue LimeGreen()
Creates a ColourValue representing the colour LimeGreen.
static ColourValue Brown()
Creates a ColourValue representing the colour Brown.
static ColourValue Orange()
Creates a ColourValue representing the colour Orange.
ColourValue operator+(const ColourValue &Colour)
Addition Operator.
static ColourValue Magenta()
Creates a ColourValue representing the colour Magenta.
bool SetValue(const Char8 *rhs)
Set the value of this.
static ColourValue Bisque()
Creates a ColourValue representing the colour Bisque.
static ColourValue PowderBlue()
Creates a ColourValue representing the colour PowderBlue.
static ColourValue LightGoldenRodYellow()
Creates a ColourValue representing the colour LightGoldenRodYellow.
static ColourValue Indigo()
Creates a ColourValue representing the colour Indigo.
static ColourValue DarkSlateGray()
Creates a ColourValue representing the colour DarkSlateGray.
static ColourValue SandyBrown()
Creates a ColourValue representing the colour SandyBrown.
static ColourValue LightSteelBlue()
Creates a ColourValue representing the colour LightSteelBlue.
bool SetName(const Char8 *rhs)
Set the name of .
static ColourValue CornFlowerBlue()
Creates a ColourValue representing the colour CornFlowerBlue.
static ColourValue LawnGreen()
Creates a ColourValue representing the colour LawnGreen.
Real GreenChannel
Value from 0.0 to 1.0 representing the amount of green present in the colour. 1.0 if very green...
static ColourValue RoyalBlue()
Creates a ColourValue representing the colour RoyalBlue.
static ColourValue Gray()
Creates a ColourValue representing the colour Gray.
static ColourValue GoldenRod()
Creates a ColourValue representing the colour GoldenRod.
static ColourValue Gainsboro()
Creates a ColourValue representing the colour Gainsboro.
A light-weight handle for manipulating nodes in DOM tree.
static ColourValue DarkOrange()
Creates a ColourValue representing the colour DarkOrange.
static ColourValue AliceBlue()
Creates a ColourValue representing the colour AliceBlue.
static ColourValue SkyBlue()
Creates a ColourValue representing the colour SkyBlue.
static ColourValue DarkGray()
Creates a ColourValue representing the colour DarkGray.
int AsInt(int def=0) const
Attempts to convert the value of the attribute to an int and returns the results. ...
static ColourValue MediumSlateBlue()
Creates a ColourValue representing the colour MediumSlateBlue.
static ColourValue LightSalmon()
Creates a ColourValue representing the colour LightSalmon.
static ColourValue Red()
Creates a ColourValue representing the colour Red.
static ColourValue SaddleBrown()
Creates a ColourValue representing the colour SaddleBrown.
static ColourValue Lime()
Creates a ColourValue representing the colour Lime.
static ColourValue DarkSalmon()
Creates a ColourValue representing the colour DarkSalmon.
static ColourValue Violet()
Creates a ColourValue representing the colour Violet.
static ColourValue Ivory()
Creates a ColourValue representing the colour Ivory.
Real AlphaChannel
Value from 0.0 to 1.0 representing the transparency of the colours. 1.0 is opaque and 0...
Boole operator!=(const ColourValue &Colour) const
Inequality Comparison Operator.
void operator=(const ColourValue &OtherColour)
Assignment operator.
static ColourValue WhiteSmoke()
Creates a ColourValue representing the colour WhiteSmoke.
static ColourValue SlateBlue()
Creates a ColourValue representing the colour SlateBlue.
Real AsReal(Real def=0) const
Attempts to convert the value of the attribute to a Real and returns the results. ...
static ColourValue DarkBlue()
Creates a ColourValue representing the colour DarkBlue.
static ColourValue Fuchsia()
Creates a ColourValue representing the colour Fuchsia.
static ColourValue LightSeaGreen()
Creates a ColourValue representing the colour LightSeaGreen.
static ColourValue LightSkyBlue()
Creates a ColourValue representing the colour LightSkyBlue.
static ColourValue DarkSlateBlue()
Creates a ColourValue representing the colour DarkSlateBlue.
static ColourValue LightSlateGray()
Creates a ColourValue representing the colour LightSlateGray.
static ColourValue Snow()
Creates a ColourValue representing the colour Snow.
static ColourValue Azure()
Creates a ColourValue representing the colour Azure.
ColourValue & operator*=(const ColourValue &Colour)
Multiplication Operator.
static ColourValue PaleTurquoise()
Creates a ColourValue representing the colour PaleTurquoise.
static ColourValue DeepSkyBlue()
Creates a ColourValue representing the colour DeepSkyBlue.
std::istream & DeSerialize(std::istream &Stream, T &Converted)
Deserialize the next xml tag in the stream into a specific in memory class instance.
static ColourValue ForestGreen()
Creates a ColourValue representing the colour ForestGreen.
void SetValues(const Real Red, const Real Green, const Real Blue, const Real Alpha)
Sets each of the colour channels.
static ColourValue OliveDrab()
Creates a ColourValue representing the colour OliveDrab.
static ColourValue Peru()
Creates a ColourValue representing the colour Peru.
void SetRedChannel(const Real Red)
Set the Red component of this color.
static ColourValue Navy()
Creates a ColourValue representing the colour Navy.
static ColourValue CadetBlue()
Creates a ColourValue representing the colour CadetBlue.
static ColourValue OrangeRed()
Creates a ColourValue representing the colour OrangeRed.
static ColourValue Chocolate()
Creates a ColourValue representing the colour Chocolate.
static ColourValue DarkRed()
Creates a ColourValue representing the colour DarkRed.
static ColourValue LightCyan()
Creates a ColourValue representing the colour LightCyan.
void ProtoDeSerialize(const XML::Node &OneNode)
Take the data stored in an XML and overwrite this instance of this object with it.
Thrown when the identity string wasn't valid at all.
static ColourValue LightCoral()
Creates a ColourValue representing the colour LightCoral.
static ColourValue LightBlue()
Creates a ColourValue representing the colour LightBlue.
The bulk of the engine components go in this namspace.
std::istream & operator>>(std::istream &stream, Mezzanine::LinearInterpolator< T > &Lint)
Used to de-serialize an Mezzanine::LinearInterpolator from a stream.
Real BlueChannel
Value from 0.0 to 1.0 representing the amount of blue present in the colour. 1.0 if very blue...
static ColourValue AntiqueWhite()
Creates a ColourValue representing the colour AntiqueWhite.
static ColourValue CornSilk()
Creates a ColourValue representing the colour CornSilk.
static ColourValue OldLace()
Creates a ColourValue representing the colour OldLace.
void ProtoSerialize(XML::Node &CurrentRoot) const
Convert this class to an XML::Node ready for serialization.
static ColourValue Linen()
Creates a ColourValue representing the colour Linen.
static ColourValue DarkKhaki()
Creates a ColourValue representing the colour DarkKhaki.
static ColourValue PaleGoldenRod()
Creates a ColourValue representing the colour PaleGoldenRod.
Real RedChannel
Value from 0.0 to 1.0 representing the amount of red present in the colour. 1.0 if very red...
static ColourValue Orchid()
Creates a ColourValue representing the colour Orchid.
const Char8 * Name() const
ptrdiff_tGet the name of this Node.
void SetAlphaChannel(const Real Alpha)
Set the Alpha component of this color.
Ogre::ColourValue GetOgreColourValue() const
Creates and returns an Ogre ColourValue class with values equal to this one.
static ColourValue Transparent()
Creates a ColourValue representing no colour.
static ColourValue Tomato()
Creates a ColourValue representing the colour Tomato.
ColourValue operator*(const Real Scalar)
Scalar Multiplication Operator.
void SerializeError(const String &FailedTo, const String &ClassName, Boole SOrD)
Simply does some string concatenation, then throws an Exception.
ColourValue(Real Red=1.0, Real Green=1.0, Real Blue=1.0, Real Alpha=1.0)
4 Reals constructor.
static ColourValue Chartreuse()
Creates a ColourValue representing the colour Chartreuse.
static ColourValue SeaShell()
Creates a ColourValue representing the colour SeaShell.
static ColourValue DarkMagenta()
Creates a ColourValue representing the colour DarkMagenta.
static ColourValue GhostWhite()
Creates a ColourValue representing the colour GhostWhite.
Node AppendChild(NodeType Type=NodeElement)
Creates a Node and makes it a child of this one.
ColourValue & operator-=(const ColourValue &Colour)
Subtraction Operator.
static ColourValue DarkViolet()
Creates a ColourValue representing the colour DarkViolet.
void SetGreenChannel(const Real Green)
Set the Green component of this color.
std::string String
A datatype used to a series of characters.
static ColourValue FloralWhite()
Creates a ColourValue representing the colour FloralWhite.
Attribute GetAttribute(const Char8 *Name) const
Attempt to get an Attribute on this Node with a given name.
static ColourValue SteelBlue()
Creates a ColourValue representing the colour SteelBlue.
static ColourValue Purple()
Creates a ColourValue representing the colour Purple.
static ColourValue Blanchedalmond()
Creates a ColourValue representing the colour Blanchedalmond.
static ColourValue MediumBlue()
Creates a ColourValue representing the colour MediumBlue.
static ColourValue Plum()
Creates a ColourValue representing the colour Plum.