95 return( (GLubyte)(255.0f *
cClamp(a_value, 0.0f, 1.0f)) );
112 return((1.0f / 255.0f) * (GLfloat)a_value);
176 const GLfloat a_green,
177 const GLfloat a_blue,
178 const GLfloat a_alpha = 1.0f)
244 inline void set(
const GLfloat a_red,
245 const GLfloat a_green,
246 const GLfloat a_blue,
247 const GLfloat a_alpha)
268 inline void set(
const GLfloat a_red,
269 const GLfloat a_green,
270 const GLfloat a_blue)
291 inline void setb(
const GLubyte a_red,
292 const GLubyte a_green,
293 const GLubyte a_blue,
294 const GLubyte a_alpha)
315 inline void setb(
const GLubyte a_red,
316 const GLubyte a_green,
317 const GLubyte a_blue)
335 inline void mul(
const GLfloat a_scale)
353 inline void setMem3(
const GLfloat* a_colorRGB)
372 inline void setMem4(
const GLfloat* a_colorRGBA)
390 inline void setR(
const GLfloat a_red)
419 inline void setG(
const GLfloat a_green)
448 inline void setB(
const GLfloat a_blue)
477 inline void setA(
const GLfloat a_alpha)
508 set(a_luminance, a_luminance, a_luminance);
611 if (
m_color[0] != a_color[0]) {
return (
false); }
612 if (
m_color[1] != a_color[1]) {
return (
false); }
613 if (
m_color[2] != a_color[2]) {
return (
false); }
628 if (
m_color[0] != a_color[0]) {
return (
true); }
629 if (
m_color[1] != a_color[1]) {
return (
true); }
630 if (
m_color[2] != a_color[2]) {
return (
true); }
1222 const GLubyte a_green,
1223 const GLubyte a_blue,
1224 const GLubyte a_alpha = 0xff)
1290 inline void set(
const GLubyte a_red,
const GLubyte a_green,
const GLubyte a_blue,
1291 const GLubyte a_alpha = 0xff)
1313 inline void setf(
const GLfloat a_red,
const GLfloat a_green,
const GLfloat a_blue,
1314 const GLfloat a_alpha = 1.0f)
1370 inline void setR(
const GLubyte a_red)
1399 inline void setG(
const GLubyte a_green)
1428 inline void setB(
const GLubyte a_blue)
1457 inline void setA(
const GLubyte a_alpha)
1488 set(a_luminance, a_luminance, a_luminance);
1515 glColor4bv((
const signed char*)(&
m_color[0]));
1589 if (
m_color[0] != a_color[0]) {
return (
false); }
1590 if (
m_color[1] != a_color[1]) {
return (
false); }
1591 if (
m_color[2] != a_color[2]) {
return (
false); }
1606 if (
m_color[0] != a_color[0]) {
return (
true); }
1607 if (
m_color[1] != a_color[1]) {
return (
true); }
1608 if (
m_color[2] != a_color[2]) {
return (
true); }
Implements general math utility functions.
Definition CAudioBuffer.cpp:57
T cClamp(const T &a_value, const T &a_low, const T &a_high)
This function clamps a value to a specified range.
Definition CMaths.h:387
GLubyte cColorFtoB(GLfloat a_value)
This function converts a color component from GLfloat type to GLubyte type.
Definition CColor.h:93
GLfloat cColorBtoF(GLubyte a_value)
This function converts a color component from GLubyte type to GLfloat type.
Definition CColor.h:110
This class defines a color using a GLubyte representation for each component.
Definition CColor.h:1185
void setBlueCornflower()
This method sets the color to Cornflower Blue.
Definition CColor.h:1935
void setBlueAqua()
This method sets the color to Aqua.
Definition CColor.h:1884
void setWhiteAntique()
This method sets the color to Antique White.
Definition CColor.h:2063
void setBrownWheat()
This method sets the color to Wheat.
Definition CColor.h:1978
GLubyte getR() const
This method returns the red component.
Definition CColor.h:1385
void setGreenForest()
This method sets the color to Forest Green.
Definition CColor.h:1841
void setBrown()
This method sets the color to Brown.
Definition CColor.h:2011
void setPurpleThistle()
This method sets the color to Thistle.
Definition CColor.h:1747
void setBluePowder()
This method sets the color to Powder Blue.
Definition CColor.h:1917
void setGreenYellow()
This method sets the color to Green Yellow.
Definition CColor.h:1808
void setYellowLight()
This method sets the color to Light Yellow.
Definition CColor.h:1710
const GLubyte * getData() const
This method returns a pointer to the color data.
Definition CColor.h:1528
void setOrangeTomato()
This method sets the color to Orange Tomato.
Definition CColor.h:1685
void setPinkMediumVioletRed()
This method sets the color to Medium Violet Red.
Definition CColor.h:1666
void setBlueMediumTurquoise()
This method sets the color to Medium Turquoise.
Definition CColor.h:1902
void setRedCrimson()
This method sets the color to Red Crimson.
Definition CColor.h:1635
void setBlueDodger()
This method sets the color to Doger Blue.
Definition CColor.h:1932
cColorb(const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue, const GLubyte a_alpha=0xff)
Constructor of cColorb. Define a color by passing its RGBA components as parameters.
Definition CColor.h:1221
cColorf getColorf() const
This method returns this color converted into cColorf format.
Definition CColor.cpp:76
void setRedSalmon()
This method sets the color to Red Salmon.
Definition CColor.h:1626
void setPurpleIndigo()
This method sets the color to Indigo.
Definition CColor.h:1789
void setBrownCornsilk()
This method sets the color to Cornsilk.
Definition CColor.h:1966
void setRedFireBrick()
This method sets the color to Red Fire Brick.
Definition CColor.h:1641
void setGreenLawn()
This method sets the color to Lawn Green.
Definition CColor.h:1814
void setBrownChocolate()
This method sets the color to Chocolate.
Definition CColor.h:2002
void setGrayGainsboro()
This method sets the color to Gainsboro.
Definition CColor.h:2082
void setGreen()
This method sets the color to Green.
Definition CColor.h:1844
void setOrangeRed()
This method sets the color to Orange Red.
Definition CColor.h:1688
void setGraySlate()
This method sets the color to Slate Gray.
Definition CColor.h:2103
void setPinkHot()
This method sets the color to Hot Pink.
Definition CColor.h:1660
void setWhiteMistyRose()
This method sets the color to Misty Rose.
Definition CColor.h:2072
void setWhiteBeige()
This method sets the color to Beige.
Definition CColor.h:2051
void setPurplePlum()
This method sets the color to Plum.
Definition CColor.h:1750
void setBlueLight()
This method sets the color to Light Blue.
Definition CColor.h:1920
void setPurpleMagenta()
This method sets the color to Magenta.
Definition CColor.h:1762
void setWhiteGhost()
This method sets the color to Ghost White.
Definition CColor.h:2042
void setLuminance(const GLubyte a_luminance)
This method sets the luminance value of this color.
Definition CColor.h:1486
void setGreenDark()
This method sets the color to Dark Green.
Definition CColor.h:1847
void setGreenDarkOlive()
This method sets the color to Dark Olive Green.
Definition CColor.h:1859
void setYellowPeachPuff()
This method sets the color to Peach Puff.
Definition CColor.h:1725
void setGreenOliveDrab()
This method sets the color to Olive Drab.
Definition CColor.h:1853
void setBlueNavy()
This method sets the color to Navy.
Definition CColor.h:1953
void setGreenSpring()
This method sets the color to Spring Green.
Definition CColor.h:1832
void setGreenLight()
This method sets the color to Light Green.
Definition CColor.h:1826
void setBrownSaddle()
This method sets the color to Saddle Brown.
Definition CColor.h:2005
void setGreenPale()
This method sets the color to Pale Green.
Definition CColor.h:1823
void setGrayLight()
This method sets the color to Light Gray.
Definition CColor.h:2085
void setGray()
This method sets the color to Gray.
Definition CColor.h:2094
void setR(const GLubyte a_red)
This method sets the red component.
Definition CColor.h:1370
void setBrownBlanchedAlmond()
This method sets the color to Blanched Almond.
Definition CColor.h:1969
GLubyte & operator[](const unsigned int n)
This operator returns the n-th component of this color (we provide both const and non-const versions ...
Definition CColor.h:1570
void setBlueDarkTurquoise()
This method sets the color to Dark Turquoise.
Definition CColor.h:1905
void setPurpleDarkOrchid()
This method sets the color to Dark Orchid.
Definition CColor.h:1780
void setBrownSandy()
This method sets the color to Sandy Brown.
Definition CColor.h:1990
void setRedLightCoral()
This method sets the color to Light Coral Red.
Definition CColor.h:1623
void setRedDark()
This method sets the color to Dark Red.
Definition CColor.h:1644
~cColorb()
Destructor of cColorb.
Definition CColor.h:1240
void setMem4(const GLubyte *a_colorRGBA)
This method sets the color by copying four floats from an external array, each describing RGBA compon...
Definition CColor.h:1352
void setWhiteMintCream()
This method sets the color to Mint Cream.
Definition CColor.h:2033
void set(const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue, const GLubyte a_alpha=0xff)
This method sets the color by passing its RGBA components as parameters in GLubyte format.
Definition CColor.h:1290
void setPurpleFuchsia()
This method sets the color to Fuchsia.
Definition CColor.h:1759
void setPinkDeep()
This method sets the color to Deep Pink.
Definition CColor.h:1663
void setBlueDark()
This method sets the color to Dark Blue.
Definition CColor.h:1950
void setPurpleMediumSlateBlue()
This method sets the color to Medium Slate Blue.
Definition CColor.h:1798
void setGreenSea()
This method sets the color to Sea Green.
Definition CColor.h:1838
void setWhiteSmoke()
This method sets the color to White Smoke.
Definition CColor.h:2045
void setBluePaleTurquoise()
This method sets the color to Pale Turquoise.
Definition CColor.h:1893
void setBrownGoldenrod()
This method sets the color to Brown Goldenrod.
Definition CColor.h:1993
void setGreenYellowGreen()
This method sets the color to Yellow Green.
Definition CColor.h:1850
void setWhiteLinen()
This method sets the color to Linen.
Definition CColor.h:2066
void setf(const GLfloat a_red, const GLfloat a_green, const GLfloat a_blue, const GLfloat a_alpha=1.0f)
This method sets the color by passing its RGBA components as parameters in float format.
Definition CColor.h:1313
void setBlueMedium()
This method sets the color to Medium Blue.
Definition CColor.h:1947
void setB(const GLubyte a_blue)
This method sets the blue component.
Definition CColor.h:1428
void setBlue()
This method sets the color to Blue.
Definition CColor.h:1944
void setWhiteFloral()
This method sets the color to Floral White.
Definition CColor.h:2057
void setBrownBurlyWood()
This method sets the color to Burly Wood.
Definition CColor.h:1981
void setBrownBisque()
This method sets the color to Bisque.
Definition CColor.h:1972
void setOrangeDark()
This method sets the color to Dark Orange.
Definition CColor.h:1691
void setGreenLimeGreen()
This method sets the color to Lime Green.
Definition CColor.h:1820
void setModificationFlags(const bool a_value)
This method is used to mark the color as modified.
Definition CColor.h:1258
void setBlueCadet()
This method sets the color to Cadet Blue.
Definition CColor.h:1908
void setYellowGold()
This method sets the color to Gold.
Definition CColor.h:1704
void setA(const GLubyte a_alpha)
This method sets the alpha component.
Definition CColor.h:1457
void setPurpleMediumOrchid()
This method sets the color to Medium Orchid.
Definition CColor.h:1765
void setRedDarkSalmon()
This method sets the color to Dark Red Salmon.
Definition CColor.h:1629
void setYellowKhaki()
This method sets the color to Khaki.
Definition CColor.h:1731
void copyTo(cColorb &a_color)
This method copies this color to another if it has been marked.
Definition CColor.h:1269
GLubyte getB() const
This method returns the blue component.
Definition CColor.h:1443
void setPinkPaleVioletRed()
This method sets the color to Pale Violet Red.
Definition CColor.h:1669
void setGrayLightSlate()
This method sets the color to Light Slate Gray.
Definition CColor.h:2100
void setPurpleOrchid()
This method sets the color to Orchid.
Definition CColor.h:1756
void setYellow()
This method sets the color to Yellow.
Definition CColor.h:1707
void setYellowLightGoldenrod()
This method sets the color to Light Goldenrod.
Definition CColor.h:1716
void setPurpleAmethyst()
This method sets the color to Amethyst.
Definition CColor.h:1771
void setWhiteAzure()
This method sets the color to Azure.
Definition CColor.h:2036
GLubyte getLuminance() const
This method returns the luminance value of this color.
Definition CColor.h:1500
void setGreenOlive()
This method sets the color to Olive.
Definition CColor.h:1856
void setPurple()
This method sets the color to Purple.
Definition CColor.h:1786
void setBlueMediumSlate()
This method sets the color to Medium Slate Blue.
Definition CColor.h:1938
void setPink()
This method sets the color to Pink.
Definition CColor.h:1654
void setPurpleDarkSlateBlue()
This method sets the color to Dark Slate Blue.
Definition CColor.h:1795
bool operator==(const cColorb &a_color)
This operator compares two colors and returns true if the color components RGB are identical,...
Definition CColor.h:1587
void setWhiteIvory()
This method sets the color to Ivory.
Definition CColor.h:2060
void setWhiteAliceBlue()
This method sets the color to Alice Blue.
Definition CColor.h:2039
void render() const
This method renders this color in OpenGL (sets it to be the current color).
Definition CColor.h:1512
void setGraySilver()
This method sets the color to Silver.
Definition CColor.h:2088
void setYellowDarkKhaki()
This method sets the color to Dark Khaki.
Definition CColor.h:1734
void setBlueSteel()
This method sets the color to Steel Blue.
Definition CColor.h:1911
void setBlueLightSteel()
This method sets the color to Light Steel Blue.
Definition CColor.h:1914
void setWhite()
This method sets the color to White.
Definition CColor.h:2024
void setBlueAquamarine()
This method sets the color to Aquamarine.
Definition CColor.h:1896
void setBrownPeru()
This method sets the color to Peru.
Definition CColor.h:1999
void setRed()
This method sets the color to Red.
Definition CColor.h:1638
void setYellowMoccasin()
This method sets the color to Moccasin.
Definition CColor.h:1722
bool m_flag_color
Flag to track if components have been modified.
Definition CColor.h:2132
void setBlueTurquoise()
This method sets the color to Turquoise.
Definition CColor.h:1899
void setOrangeLightSalmon()
This method sets the color to Orange Light Salmon.
Definition CColor.h:1679
void setBrownTan()
This method sets the color to Tan.
Definition CColor.h:1984
void setGreenLightSea()
This method sets the color to Light Sea Green.
Definition CColor.h:1868
void setBrownSienna()
This method sets the color to Sienna.
Definition CColor.h:2008
void setBlueCyan()
This method sets the color to Cyan.
Definition CColor.h:1887
void setBlueLightCyan()
This method sets the color to Light Cyan.
Definition CColor.h:1890
void setBlueDeepSky()
This method sets the color to Deep Sky Blue.
Definition CColor.h:1929
void setYellowLemonChiffon()
This method sets the color to Lemon Chiffon.
Definition CColor.h:1713
void setGreenDarkCyan()
This method sets the color to Dark Cyan.
Definition CColor.h:1871
GLubyte getA() const
This method returns the alpha component.
Definition CColor.h:1472
void setMem3(const GLubyte *a_colorRGB)
This method sets the color by copying three floats from an external array, each describing RGB compon...
Definition CColor.h:1333
void setWhiteSeashell()
This method sets the color to Seashell.
Definition CColor.h:2048
void setWhiteSnow()
This method sets the color to White Snow.
Definition CColor.h:2027
void setGreenDarkSea()
This method sets the color to Dark Sea Green.
Definition CColor.h:1865
void setGrayDark()
This method sets the color to Dark Gray.
Definition CColor.h:2091
void setGreenMediumSea()
This method sets the color to Medium Sea Green.
Definition CColor.h:1835
void setBlueLightSky()
This method sets the color to Light Sky Blue.
Definition CColor.h:1926
void setPurpleMedium()
This method sets the color to Medium Purple.
Definition CColor.h:1768
void setPurpleBlueViolet()
This method sets the color to Blue Violet.
Definition CColor.h:1774
void setOrange()
This method sets the color to Orange.
Definition CColor.h:1694
void setYellowPapayaWhip()
This method sets the color to Papaya Whip.
Definition CColor.h:1719
void setGrayLevel(const GLubyte a_level)
Definition CColor.h:2119
bool operator!=(const cColorb &a_color)
This operator compares two colors and returns false if the color components RGB are identical,...
Definition CColor.h:1604
void setGrayDim()
This method sets the color to Dim Gray.
Definition CColor.h:2097
GLubyte getG() const
This method returns the green component.
Definition CColor.h:1414
void setGreenChartreuse()
This method sets the color to Chartreuse.
Definition CColor.h:1811
void setYellowPaleGoldenrod()
This method sets the color to Pale Goldenrod.
Definition CColor.h:1728
GLubyte m_color[4]
RGBA components in GLubyte type.
Definition CColor.h:2129
void setBrownDarkGoldenrod()
This method sets the color to Dark Brown Goldenrod.
Definition CColor.h:1996
void setPurpleLavender()
This method sets the color to Lavender.
Definition CColor.h:1744
void setWhiteHoneydew()
This method sets the color to Honeydew.
Definition CColor.h:2030
void setPurpleDarkViolet()
This method sets the color to Dark Violet.
Definition CColor.h:1777
void setPinkLight()
This method sets the color to Light Pink.
Definition CColor.h:1657
void setGreenLime()
This method sets the color to Lime.
Definition CColor.h:1817
void setGreenMediumSpring()
This method sets the color to Medium Spring Green.
Definition CColor.h:1829
void setBrownNavajoWhite()
This method sets the color to Navajo White.
Definition CColor.h:1975
void setPurpleViolet()
This method sets the color to Violet.
Definition CColor.h:1753
void setGrayDarkSlate()
This method sets the color to Dark Slate Gray.
Definition CColor.h:2106
void setPurpleDarkMagenta()
This method sets the color to Dark Magenta.
Definition CColor.h:1783
void setG(const GLubyte a_green)
This method sets the green component.
Definition CColor.h:1399
void setWhiteLavenderBlush()
This method sets the color to Lavender Blush.
Definition CColor.h:2069
void setPurpleSlateBlue()
This method sets the color to Slate Blue.
Definition CColor.h:1792
cColorb()
Constructor of cColorb.
Definition CColor.h:1198
void setBrownRosy()
This method sets the color to Rosy Brown.
Definition CColor.h:1987
void setBlueRoyal()
This method sets the color to Royal Blue.
Definition CColor.h:1941
void setWhiteOldLace()
This method sets the color to Old Lace.
Definition CColor.h:2054
void setBlack()
This method sets the color to Black.
Definition CColor.h:2109
void setRedLightSalmon()
This method sets the color to Light Red Salmon.
Definition CColor.h:1632
void setOrangeCoral()
This method sets the color to Orange Coral.
Definition CColor.h:1682
void setBrownMaroon()
This method sets the color to Maroon.
Definition CColor.h:2014
GLubyte operator[](const unsigned int n) const
This operator returns the n-th component of this color (we provide both const and non-const versions ...
Definition CColor.h:1553
void setGreenMediumAquamarine()
This method sets the color to Medium Aquamarine.
Definition CColor.h:1862
void setBlueMidnight()
This method sets the color to Midnight Blue.
Definition CColor.h:1956
void setBlueSky()
This method sets the color to Sky Blue.
Definition CColor.h:1923
void setGreenTeal()
This method sets the color to Teal.
Definition CColor.h:1874
void setRedIndian()
This method sets the color to Red Indian.
Definition CColor.h:1620
This class defines a color using a GLfloat representation for each component.
Definition CColor.h:139
void setYellowLight()
This method sets the color to Light Yellow.
Definition CColor.h:732
void setb(const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue)
This method sets the color by passing its RGB components as GLubyte parameters.
Definition CColor.h:315
void mul(const GLfloat a_scale)
This method multiplies each RGB component by a scale factor a_scale passed as argument.
Definition CColor.h:335
void setYellowLightGoldenrod()
This method sets the color to Light Goldenrod.
Definition CColor.h:738
void setBrownBurlyWood()
This method sets the color to Burly Wood.
Definition CColor.h:1003
void set(const GLfloat a_red, const GLfloat a_green, const GLfloat a_blue, const GLfloat a_alpha)
This method sets the color by passing its RGBA components as GLfloat parameters.
Definition CColor.h:244
void setYellowPapayaWhip()
This method sets the color to Papaya Whip.
Definition CColor.h:741
bool operator!=(const cColorf &a_color)
This operator compares two colors and returns false if the color components RGB are identical,...
Definition CColor.h:626
void setGreenLawn()
This method sets the color to Lawn Green.
Definition CColor.h:836
void setWhiteHoneydew()
This method sets the color to Honeydew.
Definition CColor.h:1052
void setGray()
This method sets the color to Gray.
Definition CColor.h:1116
void setYellowMoccasin()
This method sets the color to Moccasin.
Definition CColor.h:744
void setPurpleMediumSlateBlue()
This method sets the color to Medium Slate Blue.
Definition CColor.h:820
void setRed()
This method sets the color to Red.
Definition CColor.h:660
void setb(const GLubyte a_red, const GLubyte a_green, const GLubyte a_blue, const GLubyte a_alpha)
This method sets the color by passing its RGBA components as GLubyte parameters.
Definition CColor.h:291
void setGreenYellow()
This method sets the color to Green Yellow.
Definition CColor.h:830
bool m_flag_color
Flag to track if components have been modified.
Definition CColor.h:1154
void setWhiteIvory()
This method sets the color to Ivory.
Definition CColor.h:1082
void setPurpleDarkViolet()
This method sets the color to Dark Violet.
Definition CColor.h:799
void setPurpleIndigo()
This method sets the color to Indigo.
Definition CColor.h:811
void setPurpleMagenta()
This method sets the color to Magenta.
Definition CColor.h:784
void setYellowGold()
This method sets the color to Gold.
Definition CColor.h:726
void setBrownGoldenrod()
This method sets the color to Brown Goldenrod.
Definition CColor.h:1015
void setBlack()
This method sets the color to Black.
Definition CColor.h:1131
void setPink()
This method sets the color to Pink.
Definition CColor.h:676
void setGreenOlive()
This method sets the color to Olive.
Definition CColor.h:878
void setWhiteSnow()
This method sets the color to White Snow.
Definition CColor.h:1049
void setGreenSpring()
This method sets the color to Spring Green.
Definition CColor.h:854
void setG(const GLfloat a_green)
This method sets the green component.
Definition CColor.h:419
void setGraySlate()
This method sets the color to Slate Gray.
Definition CColor.h:1125
void setPurpleAmethyst()
This method sets the color to Amethyst.
Definition CColor.h:793
void setPinkHot()
This method sets the color to Hot Pink.
Definition CColor.h:682
void setYellowPaleGoldenrod()
This method sets the color to Pale Goldenrod.
Definition CColor.h:750
void setBrownDarkGoldenrod()
This method sets the color to Dark Brown Goldenrod.
Definition CColor.h:1018
void setWhiteLinen()
This method sets the color to Linen.
Definition CColor.h:1088
void setBrownSienna()
This method sets the color to Sienna.
Definition CColor.h:1030
void setGrayDark()
This method sets the color to Dark Gray.
Definition CColor.h:1113
void setWhiteGhost()
This method sets the color to Ghost White.
Definition CColor.h:1064
void setPurpleFuchsia()
This method sets the color to Fuchsia.
Definition CColor.h:781
GLfloat getA() const
This method returns the alpha component.
Definition CColor.h:492
void setPurpleDarkOrchid()
This method sets the color to Dark Orchid.
Definition CColor.h:802
void setGreenDarkOlive()
This method sets the color to Dark Olive Green.
Definition CColor.h:881
void setPinkDeep()
This method sets the color to Deep Pink.
Definition CColor.h:685
void setWhiteMintCream()
This method sets the color to Mint Cream.
Definition CColor.h:1055
GLfloat getB() const
This method returns the blue component.
Definition CColor.h:463
bool operator==(const cColorf &a_color)
This operator compares two colors and returns true if the color components RGB are identical,...
Definition CColor.h:609
void setGreenLimeGreen()
This method sets the color to Lime Green.
Definition CColor.h:842
void setBrownCornsilk()
This method sets the color to Cornsilk.
Definition CColor.h:988
void setBlueSteel()
This method sets the color to Steel Blue.
Definition CColor.h:933
void setRedCrimson()
This method sets the color to Red Crimson.
Definition CColor.h:657
GLfloat getG() const
This method returns the green component.
Definition CColor.h:434
void setBluePaleTurquoise()
This method sets the color to Pale Turquoise.
Definition CColor.h:915
void set(const GLfloat a_red, const GLfloat a_green, const GLfloat a_blue)
This method sets the by passing its RGB components as GLfloat parameters.
Definition CColor.h:268
void setWhiteAntique()
This method sets the color to Antique White.
Definition CColor.h:1085
void setRedLightSalmon()
This method sets the color to Light Red Salmon.
Definition CColor.h:654
void setB(const GLfloat a_blue)
This method sets the blue component.
Definition CColor.h:448
void setGrayLightSlate()
This method sets the color to Light Slate Gray.
Definition CColor.h:1122
void setBlueLightSky()
This method sets the color to Light Sky Blue.
Definition CColor.h:948
void render() const
This method renders this color in OpenGL (sets it to be the current color).
Definition CColor.h:532
void setBrownChocolate()
This method sets the color to Chocolate.
Definition CColor.h:1024
void setGreenChartreuse()
This method sets the color to Chartreuse.
Definition CColor.h:833
void setGreenTeal()
This method sets the color to Teal.
Definition CColor.h:896
void setGreenDarkCyan()
This method sets the color to Dark Cyan.
Definition CColor.h:893
void setPurpleOrchid()
This method sets the color to Orchid.
Definition CColor.h:778
void setBlueCyan()
This method sets the color to Cyan.
Definition CColor.h:909
void setRedSalmon()
This method sets the color to Red Salmon.
Definition CColor.h:648
void setGreenOliveDrab()
This method sets the color to Olive Drab.
Definition CColor.h:875
void setGrayLevel(const GLfloat a_level)
Definition CColor.h:1141
void setBluePowder()
This method sets the color to Powder Blue.
Definition CColor.h:939
void setPinkPaleVioletRed()
This method sets the color to Pale Violet Red.
Definition CColor.h:691
void setBlueMediumSlate()
This method sets the color to Medium Slate Blue.
Definition CColor.h:960
void setBrownBlanchedAlmond()
This method sets the color to Blanched Almond.
Definition CColor.h:991
void setBlueCadet()
This method sets the color to Cadet Blue.
Definition CColor.h:930
void setBlueDark()
This method sets the color to Dark Blue.
Definition CColor.h:972
void setYellowLemonChiffon()
This method sets the color to Lemon Chiffon.
Definition CColor.h:735
void setBlueDodger()
This method sets the color to Doger Blue.
Definition CColor.h:954
void setPurple()
This method sets the color to Purple.
Definition CColor.h:808
void setWhiteBeige()
This method sets the color to Beige.
Definition CColor.h:1073
GLfloat m_color[4]
RGBA components in GLubyte type.
Definition CColor.h:1151
void setOrangeCoral()
This method sets the color to Orange Coral.
Definition CColor.h:704
void setBlueDarkTurquoise()
This method sets the color to Dark Turquoise.
Definition CColor.h:927
GLfloat & operator[](const unsigned int n)
This operator returns the n-th component of this color (we provide both const and non-const versions ...
Definition CColor.h:592
void setGrayDarkSlate()
This method sets the color to Dark Slate Gray.
Definition CColor.h:1128
GLfloat operator[](const unsigned int n) const
This operator returns the n-th component of this color (we provide both const and non-const versions ...
Definition CColor.h:575
void setBlueNavy()
This method sets the color to Navy.
Definition CColor.h:975
void setBrownSaddle()
This method sets the color to Saddle Brown.
Definition CColor.h:1027
void setRedDarkSalmon()
This method sets the color to Dark Red Salmon.
Definition CColor.h:651
void setPurpleMedium()
This method sets the color to Medium Purple.
Definition CColor.h:790
void setYellowKhaki()
This method sets the color to Khaki.
Definition CColor.h:753
void setBrown()
This method sets the color to Brown.
Definition CColor.h:1033
void setBrownSandy()
This method sets the color to Sandy Brown.
Definition CColor.h:1012
void setPinkLight()
This method sets the color to Light Pink.
Definition CColor.h:679
void setBlueAquamarine()
This method sets the color to Aquamarine.
Definition CColor.h:918
void setBlueMidnight()
This method sets the color to Midnight Blue.
Definition CColor.h:978
void setBrownBisque()
This method sets the color to Bisque.
Definition CColor.h:994
void setWhiteSeashell()
This method sets the color to Seashell.
Definition CColor.h:1070
void setPurplePlum()
This method sets the color to Plum.
Definition CColor.h:772
void setGrayLight()
This method sets the color to Light Gray.
Definition CColor.h:1107
void setWhiteAzure()
This method sets the color to Azure.
Definition CColor.h:1058
void setGrayGainsboro()
This method sets the color to Gainsboro.
Definition CColor.h:1104
void setBlueSky()
This method sets the color to Sky Blue.
Definition CColor.h:945
void setGreenLight()
This method sets the color to Light Green.
Definition CColor.h:848
void setPurpleMediumOrchid()
This method sets the color to Medium Orchid.
Definition CColor.h:787
cColorb getColorb() const
This method returns this color, converted to cColorb format.
Definition CColor.cpp:59
void setBlueLightSteel()
This method sets the color to Light Steel Blue.
Definition CColor.h:936
void setPurpleViolet()
This method sets the color to Violet.
Definition CColor.h:775
void setBlueLight()
This method sets the color to Light Blue.
Definition CColor.h:942
void setWhiteOldLace()
This method sets the color to Old Lace.
Definition CColor.h:1076
void setBlueAqua()
This method sets the color to Aqua.
Definition CColor.h:906
void setPurpleDarkMagenta()
This method sets the color to Dark Magenta.
Definition CColor.h:805
const GLfloat * getData() const
This method returns a pointer to the color data.
Definition CColor.h:548
void setPurpleLavender()
This method sets the color to Lavender.
Definition CColor.h:766
void setBrownWheat()
This method sets the color to Wheat.
Definition CColor.h:1000
void setBrownMaroon()
This method sets the color to Maroon.
Definition CColor.h:1036
~cColorf()
Definition CColor.h:194
void setModificationFlags(const bool a_value)
This method is used to mark the color as modified.
Definition CColor.h:212
void setBlueTurquoise()
This method sets the color to Turquoise.
Definition CColor.h:921
void setGreenPale()
This method sets the color to Pale Green.
Definition CColor.h:845
void setRedIndian()
This method sets the color to Red Indian.
Definition CColor.h:642
void setBrownRosy()
This method sets the color to Rosy Brown.
Definition CColor.h:1009
void setBrownTan()
This method sets the color to Tan.
Definition CColor.h:1006
void copyTo(cColorf &a_color)
This method copies this color to another if it has been marked.
Definition CColor.h:223
void setA(const GLfloat a_alpha)
This method sets the alpha component.
Definition CColor.h:477
cColorf()
Default constructor of cColorf (color defaults to opaque white).
Definition CColor.h:152
void setOrangeTomato()
This method sets the color to Orange Tomato.
Definition CColor.h:707
void setBrownNavajoWhite()
This method sets the color to Navajo White.
Definition CColor.h:997
cColorf(const GLfloat a_red, const GLfloat a_green, const GLfloat a_blue, const GLfloat a_alpha=1.0f)
Constructor of cColorf. Define a color by passing its RGBA components as arguments.
Definition CColor.h:175
void setGreenMediumSpring()
This method sets the color to Medium Spring Green.
Definition CColor.h:851
GLfloat getR() const
This method returns the red component.
Definition CColor.h:405
void setOrange()
This method sets the color to Orange.
Definition CColor.h:716
void setBlueMediumTurquoise()
This method sets the color to Medium Turquoise.
Definition CColor.h:924
void setMem4(const GLfloat *a_colorRGBA)
This method sets the color by copying four GLfloat from an array, each describing one of the RGBA com...
Definition CColor.h:372
void setPurpleBlueViolet()
This method sets the color to Blue Violet.
Definition CColor.h:796
void setGreenMediumAquamarine()
This method sets the color to Medium Aquamarine.
Definition CColor.h:884
void setGreenLime()
This method sets the color to Lime.
Definition CColor.h:839
void setWhiteFloral()
This method sets the color to Floral White.
Definition CColor.h:1079
void setGreenForest()
This method sets the color to Forest Green.
Definition CColor.h:863
void setGreenDarkSea()
This method sets the color to Dark Sea Green.
Definition CColor.h:887
void setR(const GLfloat a_red)
This method sets the red component.
Definition CColor.h:390
void setBlueDeepSky()
This method sets the color to Deep Sky Blue.
Definition CColor.h:951
void setOrangeRed()
This method sets the color to Orange Red.
Definition CColor.h:710
void setRedFireBrick()
This method sets the color to Red Fire Brick.
Definition CColor.h:663
void setPurpleSlateBlue()
This method sets the color to Slate Blue.
Definition CColor.h:814
void setRedLightCoral()
This method sets the color to Light Coral Red.
Definition CColor.h:645
void setBlueCornflower()
This method sets the color to Cornflower Blue.
Definition CColor.h:957
GLfloat getLuminance() const
This method returns the luminance value of this color.
Definition CColor.h:520
void setRedDark()
This method sets the color to Dark Red.
Definition CColor.h:666
void setBrownPeru()
This method sets the color to Peru.
Definition CColor.h:1021
void setGraySilver()
This method sets the color to Silver.
Definition CColor.h:1110
void setOrangeLightSalmon()
This method sets the color to Orange Light Salmon.
Definition CColor.h:701
void setBlueLightCyan()
This method sets the color to Light Cyan.
Definition CColor.h:912
void setPurpleDarkSlateBlue()
This method sets the color to Dark Slate Blue.
Definition CColor.h:817
void setWhiteMistyRose()
This method sets the color to Misty Rose.
Definition CColor.h:1094
void setGrayDim()
This method sets the color to Dim Gray.
Definition CColor.h:1119
void setBlueRoyal()
This method sets the color to Royal Blue.
Definition CColor.h:963
void setMem3(const GLfloat *a_colorRGB)
This method sets the color by copying three GLfloat from an array, each describing one of the RGB com...
Definition CColor.h:353
void setBlueMedium()
This method sets the color to Medium Blue.
Definition CColor.h:969
void setWhiteAliceBlue()
This method sets the color to Alice Blue.
Definition CColor.h:1061
void setWhiteSmoke()
This method sets the color to White Smoke.
Definition CColor.h:1067
void setOrangeDark()
This method sets the color to Dark Orange.
Definition CColor.h:713
void setWhiteLavenderBlush()
This method sets the color to Lavender Blush.
Definition CColor.h:1091
void setGreenDark()
This method sets the color to Dark Green.
Definition CColor.h:869
void setGreenLightSea()
This method sets the color to Light Sea Green.
Definition CColor.h:890
void setGreen()
This method sets the color to Green.
Definition CColor.h:866
void setPinkMediumVioletRed()
This method sets the color to Medium Violet Red.
Definition CColor.h:688
void setYellowDarkKhaki()
This method sets the color to Dark Khaki.
Definition CColor.h:756
void setYellow()
This method sets the color to Yellow.
Definition CColor.h:729
void setGreenYellowGreen()
This method sets the color to Yellow Green.
Definition CColor.h:872
void setWhite()
This method sets the color to White.
Definition CColor.h:1046
void setGreenMediumSea()
This method sets the color to Medium Sea Green.
Definition CColor.h:857
void setLuminance(const GLfloat a_luminance)
This method sets the luminance value of this color.
Definition CColor.h:506
void setYellowPeachPuff()
This method sets the color to Peach Puff.
Definition CColor.h:747
void setPurpleThistle()
This method sets the color to Thistle.
Definition CColor.h:769
void setGreenSea()
This method sets the color to Sea Green.
Definition CColor.h:860
void setBlue()
This method sets the color to Blue.
Definition CColor.h:966