Spinning Topp Logo BlackTopp Studios
inc
colourvalue.h
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 #ifndef _colourvalue_h
41 #define _colourvalue_h
42 
43 #include "crossplatformexport.h"
44 #include "datatypes.h"
45 #ifndef SWIG
46  #include "XML/xml.h"
47 #endif
48 
49 namespace Ogre
50 {
51  class ColourValue;
52 }
53 
54 namespace Mezzanine
55 {
56  ///////////////////////////////////////////////////////////////////////////////
57  /// @class ColourValue
58  /// @headerfile colourvalue.h
59  /// @brief This is a simple class for holding 4 reals representing the colour any give object or lightsource can have.
60  /// @note Calling the Color helper function from scripting languages without static function support is odd,
61  /// instead of a scoping operator and underscore is used in the identifier name, for example in Lua use the following syntax:
62  /// alicedressbeforegunfight=MezzanineSafe.ColourValue_AliceBlue()
63  ///////////////////////////////////////
65  {
66  public:
67  #ifndef SWIG
68  /// @brief Value from 0.0 to 1.0 representing the amount of red present in the colour. 1.0 if very red, 0.0 is no red.
69  /// @note Not accessible from scripting languages
71  /// @brief Value from 0.0 to 1.0 representing the amount of green present in the colour. 1.0 if very green, 0.0 is no green.
72  /// @note Not accessible from scripting languages
74  /// @brief Value from 0.0 to 1.0 representing the amount of blue present in the colour. 1.0 if very blue, 0.0 is no blue.
75  /// @note Not accessible from scripting languages
77  /// @brief Value from 0.0 to 1.0 representing the transparency of the colours. 1.0 is opaque and 0.0 is clear.
78  /// @note Not accessible from scripting languages
80  #endif
81 
82  /// @brief 4 Reals constructor.
83  /// @details This constructor allows you to set any values, if unset, they default to 1.0.
84  /// @param Red Real representing the amount of red present in the colour.
85  /// @param Green Real representing the amount of green present in the colour.
86  /// @param Blue Real representing the amount of blue present in the colour.
87  /// @param Alpha Real representing the transparency of the colours.
88  ColourValue(Real Red = 1.0, Real Green = 1.0, Real Blue = 1.0, Real Alpha = 1.0);
89 
90  #ifndef SWIG
91  /// @brief Ogre constructor.
92  /// @details Internal use only. Constructs a colourvalue class from an ogre colourvalue.
93  /// @param OgreValues The Ogre ColourValue class to base this class on.
94  ColourValue(const Ogre::ColourValue& OgreValues);
95  #endif
96 
97  /// @brief Copy Constructor
98  /// @param OtherColour
99  ColourValue(const ColourValue& OtherColour);
100  /// @brief XML Constructor.
101  /// @param OneNode The XML node to deserialize from.
102  ColourValue(const XML::Node& OneNode);
103  /// @brief Class destructor.
104  ~ColourValue();
105 
106  ///////////////////////////////////////////////////////////////////////////////
107  // Conversion Methods
108 
109  /// @brief Creates and returns an Ogre ColourValue class with values equal to this one.
110  /// @details This function is intended for internal use only.
111  /// @return Returns an Ogre ColourValue class that has values equal to this one.
112  Ogre::ColourValue GetOgreColourValue() const;
113 
114  ///////////////////////////////////////////////////////////////////////////////
115  // Utility
116 
117  /// @brief Set the Red component of this color.
118  /// @param Red A Real between 0 and 1 signify how much red this will color with have.
119  void SetRedChannel(const Real Red);
120  /// @brief Retrieve the Red color component.
121  /// @return A Real between 0 and 1 respresenting, how Red this this color is.
122  Real GetRedChannel() const;
123  /// @brief Set the Green component of this color.
124  /// @param Green A Real between 0 and 1 signify how much Green this will color with have.
125  void SetGreenChannel(const Real Green);
126  /// @brief Retrieve the Green color component.
127  /// @return A Real between 0 and 1 respresenting, how Green this this color is.
128  Real GetGreenChannel() const;
129  /// @brief Set the Blue component of this color.
130  /// @param Blue A Real between 0 and 1 signify how much Blue this will color with have.
131  void SetBlueChannel(const Real Blue);
132  /// @brief Retrieve the Blue color component.
133  /// @return A Real between 0 and 1 respresenting, how Blue this this color is.
134  Real GetBlueChannel() const;
135  /// @brief Set the Alpha component of this color.
136  /// @param Alpha A Real between 0 and 1 signify how much Opaque/Transparent this will color with have.
137  void SetAlphaChannel(const Real Alpha);
138  /// @brief Retrieve the Alpha color component.
139  /// @return A Real between 0 and 1 respresenting, how Transparent this this color is.
140  Real GetAlphaChannel() const;
141 
142  /// @brief Sets each of the colour channels.
143  /// @param Red A Real between 0 and 1 signify how much red this will color with have.
144  /// @param Green A Real between 0 and 1 signify how much Green this will color with have.
145  /// @param Blue A Real between 0 and 1 signify how much Blue this will color with have.
146  /// @param Alpha A Real between 0 and 1 signify how much Opaque/Transparent this will color with have.
147  void SetValues(const Real Red, const Real Green, const Real Blue, const Real Alpha);
148  /// @brief Get the color that is the average of this and another color.
149  /// @param OtherColor The other color to average with.
150  /// @return A ColourValue with each channel being the arithmetic mean of this and the OtherColor.
151  ColourValue Average(const ColourValue& OtherColor) const;
152 
153  ///////////////////////////////////////////////////////////////////////////////
154  // Overloaded Operators
155 
156  /// @brief Scalar Multiplication Operator.
157  /// @param Scalar The Scalar to multiply all the colour channels by.
158  /// @return Returns a new ColourValue with the updated values.
159  ColourValue operator*(const Real Scalar);
160 
161  /// @brief Addition Operator.
162  /// @param Colour The ColourValue to add each respective colour channel by.
163  /// @return Returns a new ColourValue with the updated values.
164  ColourValue operator+(const ColourValue& Colour);
165  /// @brief Subtraction Operator.
166  /// @param Colour The ColourValue to subtract each respective colour channel by.
167  /// @return Retruns a new ColourValue with the updated values.
168  ColourValue operator-(const ColourValue& Colour);
169  /// @brief Multiplication Operator.
170  /// @param Colour The ColourValue to multiply each respective colour channel by.
171  /// @return Returns a new ColourValue with the updated values.
172  ColourValue operator*(const ColourValue& Colour);
173 
174  /// @brief Addition Operator.
175  /// @param Colour The ColourValue to add each respective colour channel by.
176  /// @return Returns a new ColourValue with the updated values.
177  ColourValue& operator+=(const ColourValue& Colour);
178  /// @brief Subtraction Operator.
179  /// @param Colour The ColourValue to subtract each respective colour channel by.
180  /// @return Retruns a new ColourValue with the updated values.
181  ColourValue& operator-=(const ColourValue& Colour);
182  /// @brief Multiplication Operator.
183  /// @param Colour The ColourValue to multiply each respective colour channel by.
184  /// @return Returns a new ColourValue with the updated values.
185  ColourValue& operator*=(const ColourValue& Colour);
186 
187  /// @brief Equality Comparison Operator
188  /// @param Colour This is another ColourValue to compare with.
189  /// @return True if the colors match perfectly, false otherwise
190  Boole operator==(const ColourValue& Colour) const;
191  /// @brief Inequality Comparison Operator
192  /// @param Colour This is another ColourValue to compare with.
193  /// @return False if the colors match perfectly, True otherwise
194  Boole operator!=(const ColourValue& Colour) const;
195 
196  /// @brief Assignment operator.
197  /// @param OtherColour The colour values you want to overwrite this colour's values with.
198  void operator=(const ColourValue& OtherColour);
199 
200  ///////////////////////////////////////////////////////////////////////////////
201  // Prefab Colour fetchers
202 
203  /// @brief Creates a ColourValue representing no colour.
204  /// @return Returns the created ColourValue.
205  static ColourValue Transparent();
206 
207  ///////////////////////////////////////////////////////////////////////////////
208  // X11 Colour Prefabs
209 
210  /// @brief Creates a ColourValue representing the colour AliceBlue.
211  /// @return Returns the created ColourValue.
212  static ColourValue AliceBlue();
213  /// @brief Creates a ColourValue representing the colour AntiqueWhite.
214  /// @return Returns the created ColourValue.
215  static ColourValue AntiqueWhite();
216  /// @brief Creates a ColourValue representing the colour Aqua.
217  /// @return Returns the created ColourValue.
218  static ColourValue Aqua();
219  /// @brief Creates a ColourValue representing the colour Aquamarine.
220  /// @return Returns the created ColourValue.
221  static ColourValue Aquamarine();
222  /// @brief Creates a ColourValue representing the colour Azure.
223  /// @return Returns the created ColourValue.
224  static ColourValue Azure();
225  /// @brief Creates a ColourValue representing the colour Beige.
226  /// @return Returns the created ColourValue.
227  static ColourValue Beige();
228  /// @brief Creates a ColourValue representing the colour Bisque.
229  /// @return Returns the created ColourValue.
230  static ColourValue Bisque();
231  /// @brief Creates a ColourValue representing the colour Black.
232  /// @return Returns the created ColourValue.
233  static ColourValue Black();
234  /// @brief Creates a ColourValue representing the colour Blanchedalmond.
235  /// @return Returns the created ColourValue.
236  static ColourValue Blanchedalmond();
237  /// @brief Creates a ColourValue representing the colour Blue.
238  /// @return Returns the created ColourValue.
239  static ColourValue Blue();
240  /// @brief Creates a ColourValue representing the colour BlueViolet.
241  /// @return Returns the created ColourValue.
242  static ColourValue BlueViolet();
243  /// @brief Creates a ColourValue representing the colour Brown.
244  /// @return Returns the created ColourValue.
245  static ColourValue Brown();
246  /// @brief Creates a ColourValue representing the colour BurlyWood.
247  /// @return Returns the created ColourValue.
248  static ColourValue BurlyWood();
249  /// @brief Creates a ColourValue representing the colour CadetBlue.
250  /// @return Returns the created ColourValue.
251  static ColourValue CadetBlue();
252  /// @brief Creates a ColourValue representing the colour Chartreuse.
253  /// @return Returns the created ColourValue.
254  static ColourValue Chartreuse();
255  /// @brief Creates a ColourValue representing the colour Chocolate.
256  /// @return Returns the created ColourValue.
257  static ColourValue Chocolate();
258  /// @brief Creates a ColourValue representing the colour Coral.
259  /// @return Returns the created ColourValue.
260  static ColourValue Coral();
261  /// @brief Creates a ColourValue representing the colour CornFlowerBlue.
262  /// @return Returns the created ColourValue.
263  static ColourValue CornFlowerBlue();
264  /// @brief Creates a ColourValue representing the colour CornSilk.
265  /// @return Returns the created ColourValue.
266  static ColourValue CornSilk();
267  /// @brief Creates a ColourValue representing the colour Crimson.
268  /// @return Returns the created ColourValue.
269  static ColourValue Crimson();
270  /// @brief Creates a ColourValue representing the colour Cyan.
271  /// @return Returns the created ColourValue.
272  static ColourValue Cyan();
273  /// @brief Creates a ColourValue representing the colour DarkBlue.
274  /// @return Returns the created ColourValue.
275  static ColourValue DarkBlue();
276  /// @brief Creates a ColourValue representing the colour DarkCyan.
277  /// @return Returns the created ColourValue.
278  static ColourValue DarkCyan();
279  /// @brief Creates a ColourValue representing the colour DarkGoldenRod.
280  /// @return Returns the created ColourValue.
281  static ColourValue DarkGoldenRod();
282  /// @brief Creates a ColourValue representing the colour DarkGray.
283  /// @return Returns the created ColourValue.
284  static ColourValue DarkGray();
285  /// @brief Creates a ColourValue representing the colour DarkGreen.
286  /// @return Returns the created ColourValue.
287  static ColourValue DarkGreen();
288  /// @brief Creates a ColourValue representing the colour DarkKhaki.
289  /// @return Returns the created ColourValue.
290  static ColourValue DarkKhaki();
291  /// @brief Creates a ColourValue representing the colour DarkMagenta.
292  /// @return Returns the created ColourValue.
293  static ColourValue DarkMagenta();
294  /// @brief Creates a ColourValue representing the colour DarkOliveGreen.
295  /// @return Returns the created ColourValue.
296  static ColourValue DarkOliveGreen();
297  /// @brief Creates a ColourValue representing the colour DarkOrange.
298  /// @return Returns the created ColourValue.
299  static ColourValue DarkOrange();
300  /// @brief Creates a ColourValue representing the colour DarkOrchid.
301  /// @return Returns the created ColourValue.
302  static ColourValue DarkOrchid();
303  /// @brief Creates a ColourValue representing the colour DarkRed.
304  /// @return Returns the created ColourValue.
305  static ColourValue DarkRed();
306  /// @brief Creates a ColourValue representing the colour DarkSalmon.
307  /// @return Returns the created ColourValue.
308  static ColourValue DarkSalmon();
309  /// @brief Creates a ColourValue representing the colour DarkSeaGreen.
310  /// @return Returns the created ColourValue.
311  static ColourValue DarkSeaGreen();
312  /// @brief Creates a ColourValue representing the colour DarkSlateBlue.
313  /// @return Returns the created ColourValue.
314  static ColourValue DarkSlateBlue();
315  /// @brief Creates a ColourValue representing the colour DarkSlateGray.
316  /// @return Returns the created ColourValue.
317  static ColourValue DarkSlateGray();
318  /// @brief Creates a ColourValue representing the colour DarkTurquoise.
319  /// @return Returns the created ColourValue.
320  static ColourValue DarkTurquoise();
321  /// @brief Creates a ColourValue representing the colour DarkViolet.
322  /// @return Returns the created ColourValue.
323  static ColourValue DarkViolet();
324  /// @brief Creates a ColourValue representing the colour DeepPink.
325  /// @return Returns the created ColourValue.
326  static ColourValue DeepPink();
327  /// @brief Creates a ColourValue representing the colour DeepSkyBlue.
328  /// @return Returns the created ColourValue.
329  static ColourValue DeepSkyBlue();
330  /// @brief Creates a ColourValue representing the colour DimGray.
331  /// @return Returns the created ColourValue.
332  static ColourValue DimGray();
333  /// @brief Creates a ColourValue representing the colour DodgerBlue.
334  /// @return Returns the created ColourValue.
335  static ColourValue DodgerBlue();
336  /// @brief Creates a ColourValue representing the colour FireBrick.
337  /// @return Returns the created ColourValue.
338  static ColourValue FireBrick();
339  /// @brief Creates a ColourValue representing the colour FloralWhite.
340  /// @return Returns the created ColourValue.
341  static ColourValue FloralWhite();
342  /// @brief Creates a ColourValue representing the colour ForestGreen.
343  /// @return Returns the created ColourValue.
344  static ColourValue ForestGreen();
345  /// @brief Creates a ColourValue representing the colour Fuchsia.
346  /// @return Returns the created ColourValue.
347  static ColourValue Fuchsia();
348  /// @brief Creates a ColourValue representing the colour Gainsboro.
349  /// @return Returns the created ColourValue.
350  static ColourValue Gainsboro();
351  /// @brief Creates a ColourValue representing the colour GhostWhite.
352  /// @return Returns the created ColourValue.
353  static ColourValue GhostWhite();
354  /// @brief Creates a ColourValue representing the colour Gold.
355  /// @return Returns the created ColourValue.
356  static ColourValue Gold();
357  /// @brief Creates a ColourValue representing the colour GoldenRod.
358  /// @return Returns the created ColourValue.
359  static ColourValue GoldenRod();
360  /// @brief Creates a ColourValue representing the colour Gray.
361  /// @return Returns the created ColourValue.
362  static ColourValue Gray();
363  /// @brief Creates a ColourValue representing the colour Green.
364  /// @return Returns the created ColourValue.
365  static ColourValue Green();
366  /// @brief Creates a ColourValue representing the colour GreenYellow.
367  /// @return Returns the created ColourValue.
368  static ColourValue GreenYellow();
369  /// @brief Creates a ColourValue representing the colour HoneyDew.
370  /// @return Returns the created ColourValue.
371  static ColourValue HoneyDew();
372  /// @brief Creates a ColourValue representing the colour HotPink.
373  /// @return Returns the created ColourValue.
374  static ColourValue HotPink();
375  /// @brief Creates a ColourValue representing the colour IndianRed.
376  /// @return Returns the created ColourValue.
377  static ColourValue IndianRed();
378  /// @brief Creates a ColourValue representing the colour Indigo.
379  /// @return Returns the created ColourValue.
380  static ColourValue Indigo();
381  /// @brief Creates a ColourValue representing the colour Ivory.
382  /// @return Returns the created ColourValue.
383  static ColourValue Ivory();
384  /// @brief Creates a ColourValue representing the colour Khaki.
385  /// @return Returns the created ColourValue.
386  static ColourValue Khaki();
387  /// @brief Creates a ColourValue representing the colour Lavender.
388  /// @return Returns the created ColourValue.
389  static ColourValue Lavender();
390  /// @brief Creates a ColourValue representing the colour LavenderBlush.
391  /// @return Returns the created ColourValue.
392  static ColourValue LavenderBlush();
393  /// @brief Creates a ColourValue representing the colour LawnGreen.
394  /// @return Returns the created ColourValue.
395  static ColourValue LawnGreen();
396  /// @brief Creates a ColourValue representing the colour LemonChiffon.
397  /// @return Returns the created ColourValue.
398  static ColourValue LemonChiffon();
399  /// @brief Creates a ColourValue representing the colour LightBlue.
400  /// @return Returns the created ColourValue.
401  static ColourValue LightBlue();
402  /// @brief Creates a ColourValue representing the colour LightCoral.
403  /// @return Returns the created ColourValue.
404  static ColourValue LightCoral();
405  /// @brief Creates a ColourValue representing the colour LightCyan.
406  /// @return Returns the created ColourValue.
407  static ColourValue LightCyan();
408  /// @brief Creates a ColourValue representing the colour LightGoldenRodYellow.
409  /// @return Returns the created ColourValue.
410  static ColourValue LightGoldenRodYellow();
411  /// @brief Creates a ColourValue representing the colour LightGray.
412  /// @return Returns the created ColourValue.
413  static ColourValue LightGray();
414  /// @brief Creates a ColourValue representing the colour LightGreen.
415  /// @return Returns the created ColourValue.
416  static ColourValue LightGreen();
417  /// @brief Creates a ColourValue representing the colour LightPink.
418  /// @return Returns the created ColourValue.
419  static ColourValue LightPink();
420  /// @brief Creates a ColourValue representing the colour LightSalmon.
421  /// @return Returns the created ColourValue.
422  static ColourValue LightSalmon();
423  /// @brief Creates a ColourValue representing the colour LightSeaGreen.
424  /// @return Returns the created ColourValue.
425  static ColourValue LightSeaGreen();
426  /// @brief Creates a ColourValue representing the colour LightSkyBlue.
427  /// @return Returns the created ColourValue.
428  static ColourValue LightSkyBlue();
429  /// @brief Creates a ColourValue representing the colour LightSlateGray.
430  /// @return Returns the created ColourValue.
431  static ColourValue LightSlateGray();
432  /// @brief Creates a ColourValue representing the colour LightSteelBlue.
433  /// @return Returns the created ColourValue.
434  static ColourValue LightSteelBlue();
435  /// @brief Creates a ColourValue representing the colour LightYellow.
436  /// @return Returns the created ColourValue.
437  static ColourValue LightYellow();
438  /// @brief Creates a ColourValue representing the colour Lime.
439  /// @return Returns the created ColourValue.
440  static ColourValue Lime();
441  /// @brief Creates a ColourValue representing the colour LimeGreen.
442  /// @return Returns the created ColourValue.
443  static ColourValue LimeGreen();
444  /// @brief Creates a ColourValue representing the colour Linen.
445  /// @return Returns the created ColourValue.
446  static ColourValue Linen();
447  /// @brief Creates a ColourValue representing the colour Magenta.
448  /// @return Returns the created ColourValue.
449  static ColourValue Magenta();
450  /// @brief Creates a ColourValue representing the colour Maroon.
451  /// @return Returns the created ColourValue.
452  static ColourValue Maroon();
453  /// @brief Creates a ColourValue representing the colour MediumAquamarine.
454  /// @return Returns the created ColourValue.
455  static ColourValue MediumAquamarine();
456  /// @brief Creates a ColourValue representing the colour MediumBlue.
457  /// @return Returns the created ColourValue.
458  static ColourValue MediumBlue();
459  /// @brief Creates a ColourValue representing the colour MediumOrchid.
460  /// @return Returns the created ColourValue.
461  static ColourValue MediumOrchid();
462  /// @brief Creates a ColourValue representing the colour MediumPurple.
463  /// @return Returns the created ColourValue.
464  static ColourValue MediumPurple();
465  /// @brief Creates a ColourValue representing the colour MediumSeaGreen.
466  /// @return Returns the created ColourValue.
467  static ColourValue MediumSeaGreen();
468  /// @brief Creates a ColourValue representing the colour MediumSlateBlue.
469  /// @return Returns the created ColourValue.
470  static ColourValue MediumSlateBlue();
471  /// @brief Creates a ColourValue representing the colour MediumSpringGreen.
472  /// @return Returns the created ColourValue.
473  static ColourValue MediumSpringGreen();
474  /// @brief Creates a ColourValue representing the colour MediumTurquoise.
475  /// @return Returns the created ColourValue.
476  static ColourValue MediumTurquoise();
477  /// @brief Creates a ColourValue representing the colour MediumVioletRed.
478  /// @return Returns the created ColourValue.
479  static ColourValue MediumVioletRed();
480  /// @brief Creates a ColourValue representing the colour MidnightBlue.
481  /// @return Returns the created ColourValue.
482  static ColourValue MidnightBlue();
483  /// @brief Creates a ColourValue representing the colour MintCream.
484  /// @return Returns the created ColourValue.
485  static ColourValue MintCream();
486  /// @brief Creates a ColourValue representing the colour MistyRose.
487  /// @return Returns the created ColourValue.
488  static ColourValue MistyRose();
489  /// @brief Creates a ColourValue representing the colour Moccasin.
490  /// @return Returns the created ColourValue.
491  static ColourValue Moccasin();
492  /// @brief Creates a ColourValue representing the colour NavajoWhite.
493  /// @return Returns the created ColourValue.
494  static ColourValue NavajoWhite();
495  /// @brief Creates a ColourValue representing the colour Navy.
496  /// @return Returns the created ColourValue.
497  static ColourValue Navy();
498  /// @brief Creates a ColourValue representing the colour OldLace.
499  /// @return Returns the created ColourValue.
500  static ColourValue OldLace();
501  /// @brief Creates a ColourValue representing the colour Olive.
502  /// @return Returns the created ColourValue.
503  static ColourValue Olive();
504  /// @brief Creates a ColourValue representing the colour OliveDrab.
505  /// @return Returns the created ColourValue.
506  static ColourValue OliveDrab();
507  /// @brief Creates a ColourValue representing the colour Orange.
508  /// @return Returns the created ColourValue.
509  static ColourValue Orange();
510  /// @brief Creates a ColourValue representing the colour OrangeRed.
511  /// @return Returns the created ColourValue.
512  static ColourValue OrangeRed();
513  /// @brief Creates a ColourValue representing the colour Orchid.
514  /// @return Returns the created ColourValue.
515  static ColourValue Orchid();
516  /// @brief Creates a ColourValue representing the colour PaleGoldenRod.
517  /// @return Returns the created ColourValue.
518  static ColourValue PaleGoldenRod();
519  /// @brief Creates a ColourValue representing the colour PaleGreen.
520  /// @return Returns the created ColourValue.
521  static ColourValue PaleGreen();
522  /// @brief Creates a ColourValue representing the colour PaleTurquoise.
523  /// @return Returns the created ColourValue.
524  static ColourValue PaleTurquoise();
525  /// @brief Creates a ColourValue representing the colour PaleVioletRed.
526  /// @return Returns the created ColourValue.
527  static ColourValue PaleVioletRed();
528  /// @brief Creates a ColourValue representing the colour PapayaWhip.
529  /// @return Returns the created ColourValue.
530  static ColourValue PapayaWhip();
531  /// @brief Creates a ColourValue representing the colour PeachPuff.
532  /// @return Returns the created ColourValue.
533  static ColourValue PeachPuff();
534  /// @brief Creates a ColourValue representing the colour Peru.
535  /// @return Returns the created ColourValue.
536  static ColourValue Peru();
537  /// @brief Creates a ColourValue representing the colour Pink.
538  /// @return Returns the created ColourValue.
539  static ColourValue Pink();
540  /// @brief Creates a ColourValue representing the colour Plum.
541  /// @return Returns the created ColourValue.
542  static ColourValue Plum();
543  /// @brief Creates a ColourValue representing the colour PowderBlue.
544  /// @return Returns the created ColourValue.
545  static ColourValue PowderBlue();
546  /// @brief Creates a ColourValue representing the colour Purple.
547  /// @return Returns the created ColourValue.
548  static ColourValue Purple();
549  /// @brief Creates a ColourValue representing the colour Red.
550  /// @return Returns the created ColourValue.
551  static ColourValue Red();
552  /// @brief Creates a ColourValue representing the colour RosyBrown.
553  /// @return Returns the created ColourValue.
554  static ColourValue RosyBrown();
555  /// @brief Creates a ColourValue representing the colour RoyalBlue.
556  /// @return Returns the created ColourValue.
557  static ColourValue RoyalBlue();
558  /// @brief Creates a ColourValue representing the colour SaddleBrown.
559  /// @return Returns the created ColourValue.
560  static ColourValue SaddleBrown();
561  /// @brief Creates a ColourValue representing the colour Salmon.
562  /// @return Returns the created ColourValue.
563  static ColourValue Salmon();
564  /// @brief Creates a ColourValue representing the colour SandyBrown.
565  /// @return Returns the created ColourValue.
566  static ColourValue SandyBrown();
567  /// @brief Creates a ColourValue representing the colour SeaGreen.
568  /// @return Returns the created ColourValue.
569  static ColourValue SeaGreen();
570  /// @brief Creates a ColourValue representing the colour SeaShell.
571  /// @return Returns the created ColourValue.
572  static ColourValue SeaShell();
573  /// @brief Creates a ColourValue representing the colour Sienna.
574  /// @return Returns the created ColourValue.
575  static ColourValue Sienna();
576  /// @brief Creates a ColourValue representing the colour Silver.
577  /// @return Returns the created ColourValue.
578  static ColourValue Silver();
579  /// @brief Creates a ColourValue representing the colour SkyBlue.
580  /// @return Returns the created ColourValue.
581  static ColourValue SkyBlue();
582  /// @brief Creates a ColourValue representing the colour SlateBlue.
583  /// @return Returns the created ColourValue.
584  static ColourValue SlateBlue();
585  /// @brief Creates a ColourValue representing the colour SlateGray.
586  /// @return Returns the created ColourValue.
587  static ColourValue SlateGray();
588  /// @brief Creates a ColourValue representing the colour Snow.
589  /// @return Returns the created ColourValue.
590  static ColourValue Snow();
591  /// @brief Creates a ColourValue representing the colour SpringGreen.
592  /// @return Returns the created ColourValue.
593  static ColourValue SpringGreen();
594  /// @brief Creates a ColourValue representing the colour SteelBlue.
595  /// @return Returns the created ColourValue.
596  static ColourValue SteelBlue();
597  /// @brief Creates a ColourValue representing the colour Tan.
598  /// @return Returns the created ColourValue.
599  static ColourValue Tan();
600  /// @brief Creates a ColourValue representing the colour Teal.
601  /// @return Returns the created ColourValue.
602  static ColourValue Teal();
603  /// @brief Creates a ColourValue representing the colour Thistle.
604  /// @return Returns the created ColourValue.
605  static ColourValue Thistle();
606  /// @brief Creates a ColourValue representing the colour Tomato.
607  /// @return Returns the created ColourValue.
608  static ColourValue Tomato();
609  /// @brief Creates a ColourValue representing the colour Turquoise.
610  /// @return Returns the created ColourValue.
611  static ColourValue Turquoise();
612  /// @brief Creates a ColourValue representing the colour Violet.
613  /// @return Returns the created ColourValue.
614  static ColourValue Violet();
615  /// @brief Creates a ColourValue representing the colour Wheat.
616  /// @return Returns the created ColourValue.
617  static ColourValue Wheat();
618  /// @brief Creates a ColourValue representing the colour White.
619  /// @return Returns the created ColourValue.
620  static ColourValue White();
621  /// @brief Creates a ColourValue representing the colour WhiteSmoke.
622  /// @return Returns the created ColourValue.
623  static ColourValue WhiteSmoke();
624  /// @brief Creates a ColourValue representing the colour Yellow.
625  /// @return Returns the created ColourValue.
626  static ColourValue Yellow();
627  /// @brief Creates a ColourValue representing the colour YellowGreen.
628  /// @return Returns the created ColourValue.
629  static ColourValue YellowGreen();
630 
631  ///////////////////////////////////////////////////////////////////////////////
632  // Serialization
633 
634  /// @brief Convert this class to an XML::Node ready for serialization
635  /// @param CurrentRoot The point in the XML hierarchy that all this ColourValue should be appended to.
636  void ProtoSerialize(XML::Node& CurrentRoot) const;
637  /// @brief Take the data stored in an XML and overwrite this instance of this object with it
638  /// @param OneNode An XML::Node containing the data.
639  void ProtoDeSerialize(const XML::Node& OneNode);
640  /// @brief Get the name of the the XML tag this class will leave behind as its instances are serialized.
641  /// @return A string containing "ColourValue"
642  static String GetSerializableName();
643  };// ColourValue
644 }//Mezzanine
645 
646 #ifndef SWIG
647 ///////////////////////////////////////////////////////////////////////////////
648 // Class External << Operators for streaming or assignment
649 /// @brief Serializes the passed Mezzanine::ColourValue to XML
650 /// @param stream The ostream to send the xml to.
651 /// @param Ev the Mezzanine::ColourValue to be serialized
652 /// @return this returns the ostream, now with the serialized data
653 std::ostream& MEZZ_LIB operator << (std::ostream& stream, const Mezzanine::ColourValue& Ev);
654 
655 /// @brief Deserialize a Mezzanine::ColourValue
656 /// @param stream The istream to get the xml from to (re)make the Mezzanine::ColourValue.
657 /// @param Ev the Mezzanine::ColourValue to be deserialized.
658 /// @return this returns the ostream, advanced past the Mezzanine::ColourValue that was recreated onto Ev.
659 std::istream& MEZZ_LIB operator >> (std::istream& stream, Mezzanine::ColourValue& Ev);
660 
661 /// @brief Set all values of a Mezzanine::ColourValue from parsed xml.
662 /// @param OneNode The istream to get the xml from to (re)make the Mezzanine::ColourValue.
663 /// @param Ev the Mezzanine::ColourValue to be reset.
665 #endif
666 
667 
668 #endif
std::ostream & operator<<(std::ostream &stream, const Mezzanine::LinearInterpolator< T > &Lint)
Used to Serialize an Mezzanine::LinearInterpolator to a human readable stream.
Definition: interpolator.h:433
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
This file is used on some platforms to determine what data should be read and written to and from a s...
All the definitions for datatypes as well as some basic conversion functions are defined here...
SmoothTrackIterator< InterpolatableType > & operator+(Integer Steps, SmoothTrackIterator< InterpolatableType > &Iter)
This allows for addition with and an Integer on the Left hand side, such as: 2 + Iter.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
Definition: colourvalue.h:64
float Real
A Datatype used to represent a real floating point number.
Definition: datatypes.h:141
Real GreenChannel
Value from 0.0 to 1.0 representing the amount of green present in the colour. 1.0 if very green...
Definition: colourvalue.h:73
SmoothTrackIterator< InterpolatableType > & operator-(Integer Steps, SmoothTrackIterator< InterpolatableType > &Iter)
This allows for subtraction with and an Integer on the Left hand side, such as: 2 + Iter...
A light-weight handle for manipulating nodes in DOM tree.
Definition: node.h:89
Mezzanine::Vector3 operator*(const btVector3 &Vec, const Mezzanine::Vector3 &lhs)
Right Hand Multiplication Operator for Bullet Vectors with a Mezzanine::Vector3.
Definition: vector3.cpp:651
Real AlphaChannel
Value from 0.0 to 1.0 representing the transparency of the colours. 1.0 is opaque and 0...
Definition: colourvalue.h:79
#define MEZZ_LIB
Some platforms require special decorations to denote what is exported/imported in a share library...
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
std::istream & operator>>(std::istream &stream, Mezzanine::LinearInterpolator< T > &Lint)
Used to de-serialize an Mezzanine::LinearInterpolator from a stream.
Definition: interpolator.h:448
Real BlueChannel
Value from 0.0 to 1.0 representing the amount of blue present in the colour. 1.0 if very blue...
Definition: colourvalue.h:76
Real RedChannel
Value from 0.0 to 1.0 representing the amount of red present in the colour. 1.0 if very red...
Definition: colourvalue.h:70
std::string String
A datatype used to a series of characters.
Definition: datatypes.h:159