List of all members
clan::Colorf Class Reference
clanDisplay 2D

Floating point color description class (for float). More...

`#include <color.h>`

Inheritance diagram for clan::Colorf:

## Public Member Functions
Construction
| Colorf ()
| Constructs a color. More...
| Colorf (float r, float g, float b, float a=1.0f)
| Constructs a color. More...
| Colorf (const float *array_rgba)
| Constructs a color. More...
| Colorf (const Vec4f &color)
| Constructs a color. More...
| Colorf (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
| Constructs a color. More...
| Colorf (int r, int g, int b, int a=255)
| Constructs a color. More...
| Colorf (const Color &color)
| Colorf (const std::string &hexstr)
| Constructs a color. More...
Attributes
float | get_red () const
| Get Red. More...
float | get_green () const
| Get Green. More...
float | get_blue () const
| Get Blue. More...
float | get_alpha () const
| Get Alpha. More...
Operations
void | normalize ()
| Normalize the color by ensuring that all color values lie inbetween (0.0, 1.0) More...
void | set_alpha (float value)
| Set alpha color component, in the range 0-1. More...
void | set_red (float value)
| Set red color component, in the range 0-1. More...
void | set_green (float value)
| Set green color component, in the range 0-1. More...
void | set_blue (float value)
| Set blue color component, in the range 0-1. More...
bool | operator== (const Colorf &c) const
| Color == Color operator (deep compare) More...
bool | operator!= (const Colorf &c) const
| Color != Color operator (deep compare) More...
| operator Color () const
| Type conversion operator. More...
Public Member Functions inherited from clan::Vec4< Type >
| Vec4 ()
| Vec4 (const Type &scalar)
| Vec4 (const Vec2< Type > &copy, const Type &p3, const Type &p4)
| Vec4 (const Vec2< Type > &copy, const Vec2< Type > &copy34)
| Vec4 (const Vec3< Type > &copy, const Type &p4)
| Vec4 (const Type &p1, const Type &p2, const Type &p3, const Type &p4)
| Vec4 (const Type &p1, const Type &p2, const Vec2< Type > &copy34)
| Vec4 (const Type *array_xyzw)
template<>
double | length3 () const
template<>
float | length3 () const
template<>
double | length4 () const
template<>
float | length4 () const
void | set_xy (const Vec2< Type > &new_v)
void | set_zw (const Vec2< Type > &new_v)
*Type | length3 () const
| Returns the length (magnitude) of this vector (not taking into account the w ordinate). More...
*Type | length4 () const
| Returns the length (magnitude) of this vector (taking into account the w ordinate). More...
Vec4< Type > & | normalize3 ()
| Normalizes this vector (not taking into account the w ordinate) More...
Vec4< Type > & | normalize4 ()
| Normalizes this vector (taking into account the w ordinate) More...
Type | dot3 (const Vec4< Type > &vector) const
| Dot products this vector with an other vector (not taking into account the w ordinate). More...
Type | dot4 (const Vec4< Type > &vector) const
| Dot products this vector with an other vector (taking into account the w ordinate). More...
Angle | angle3 (const Vec4< Type > &vector) const
| Calculate the angle between this vector and an other vector (not taking into account the w ordinate). More...
Type | distance3 (const Vec4< Type > &vector) const
| Calculate the distance between this vector and an other vector (not taking into account the w ordinate). More...
Type | distance4 (const Vec4< Type > &vector) const
| Calculate the distance between this vector and an other vector (taking into account the w ordinate). More...
Vec4< Type > & | cross3 (const Vec4< Type > &vector)
| Calculate the cross product between this vector and an other vector (not taking into account the w ordinate). More...
Vec4< Type > & | rotate3 (const Angle &angle, const Vec4< Type > &axis)
| Rotate this vector around an axis. Same as glRotate[f|d](angle, a);. More...
Vec4< Type > & | round ()
| Rounds all components on this vector. More...
bool | is_equal (const Vec4< Type > &other, Type epsilon) const
| Returns true if equal within the bounds of an epsilon. More...
void | operator+= (const Vec4< Type > &vector)
| += operator. More...
void | operator+= (Type value)
| += operator. More...
void | operator-= (const Vec4< Type > &vector)
| -= operator. More...
void | operator-= (Type value)
| -= operator. More...
Vec4< Type > | operator- () const
| operator. More...
void | operator*= (const Vec4< Type > &vector)
| *= operator. More...
void | operator*= (Type value)
| *= operator. More...
void | operator/= (const Vec4< Type > &vector)
| /= operator. More...
void | operator/= (Type value)
| /= operator. More...
Vec4< Type > & | operator= (const Vec4< Type > &vector)
| = operator. More...
bool | operator== (const Vec4< Type > &vector) const
| == operator. More...
bool | operator!= (const Vec4< Type > &vector) const
| != operator. More...
bool | operator< (const Vec4< Type > &vector) const
| < operator. More...

## Static Public Attributes
Statics
static Colorf | aliceblue
static Colorf | antiquewhite
static Colorf | aqua
static Colorf | aquamarine
static Colorf | azure
static Colorf | beige
static Colorf | bisque
static Colorf | black
static Colorf | blanchedalmond
static Colorf | blue
static Colorf | blueviolet
static Colorf | brown
static Colorf | burlywood
static Colorf | cadetblue
static Colorf | chartreuse
static Colorf | chocolate
static Colorf | coral
static Colorf | cornflowerblue
static Colorf | cornsilk
static Colorf | crimson
static Colorf | cyan
static Colorf | darkblue
static Colorf | darkcyan
static Colorf | darkgoldenrod
static Colorf | darkgray
static Colorf | darkgreen
static Colorf | darkgrey
static Colorf | darkkhaki
static Colorf | darkmagenta
static Colorf | darkolivegreen
static Colorf | darkorange
static Colorf | darkorchid
static Colorf | darkred
static Colorf | darksalmon
static Colorf | darkseagreen
static Colorf | darkslateblue
static Colorf | darkslategray
static Colorf | darkslategrey
static Colorf | darkturquoise
static Colorf | darkviolet
static Colorf | deeppink
static Colorf | deepskyblue
static Colorf | dimgray
static Colorf | dimgrey
static Colorf | dodgerblue
static Colorf | firebrick
static Colorf | floralwhite
static Colorf | forestgreen
static Colorf | fuchsia
static Colorf | gainsboro
static Colorf | ghostwhite
static Colorf | gold
static Colorf | goldenrod
static Colorf | gray
static Colorf | grey
static Colorf | green
static Colorf | greenyellow
static Colorf | honeydew
static Colorf | hotpink
static Colorf | indianred
static Colorf | indigo
static Colorf | ivory
static Colorf | khaki
static Colorf | lavender
static Colorf | lavenderblush
static Colorf | lawngreen
static Colorf | lemonchiffon
static Colorf | lightblue
static Colorf | lightcoral
static Colorf | lightcyan
static Colorf | lightgoldenrodyellow
static Colorf | lightgray
static Colorf | lightgreen
static Colorf | lightgrey
static Colorf | lightpink
static Colorf | lightsalmon
static Colorf | lightseagreen
static Colorf | lightskyblue
static Colorf | lightslategray
static Colorf | lightslategrey
static Colorf | lightsteelblue
static Colorf | lightyellow
static Colorf | lime
static Colorf | limegreen
static Colorf | linen
static Colorf | magenta
static Colorf | maroon
static Colorf | mediumaquamarine
static Colorf | mediumblue
static Colorf | mediumorchid
static Colorf | mediumpurple
static Colorf | mediumseagreen
static Colorf | mediumslateblue
static Colorf | mediumspringgreen
static Colorf | mediumturquoise
static Colorf | mediumvioletred
static Colorf | midnightblue
static Colorf | mintcream
static Colorf | mistyrose
static Colorf | moccasin
static Colorf | navajowhite
static Colorf | navy
static Colorf | oldlace
static Colorf | olive
static Colorf | olivedrab
static Colorf | orange
static Colorf | orangered
static Colorf | orchid
static Colorf | palegoldenrod
static Colorf | palegreen
static Colorf | paleturquoise
static Colorf | palevioletred
static Colorf | papayawhip
static Colorf | peachpuff
static Colorf | peru
static Colorf | pink
static Colorf | plum
static Colorf | powderblue
static Colorf | purple
static Colorf | red
static Colorf | rosybrown
static Colorf | royalblue
static Colorf | saddlebrown
static Colorf | salmon
static Colorf | sandybrown
static Colorf | seagreen
static Colorf | seashell
static Colorf | sienna
static Colorf | silver
static Colorf | skyblue
static Colorf | slateblue
static Colorf | slategray
static Colorf | slategrey
static Colorf | snow
static Colorf | springgreen
static Colorf | steelblue
static Colorf | tan
static Colorf | teal
static Colorf | thistle
static Colorf | tomato
static Colorf | turquoise
static Colorf | violet
static Colorf | wheat
static Colorf | white
static Colorf | whitesmoke
static Colorf | yellow
static Colorf | yellowgreen
static Colorf | transparent
| rgba(0, 0, 0, 0). More...
static Colorf | gray10
static Colorf | gray20
static Colorf | gray30
static Colorf | gray40
static Colorf | gray50
static Colorf | gray60
static Colorf | gray70
static Colorf | gray80
static Colorf | gray90

## Additional Inherited Members
Public Types inherited from clan::Vec4< Type >
typedef Type | datatype
Static Public Member Functions inherited from clan::Vec4< Type >
static Vec4< Type > | cross3 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Calculate the cross product between two vectors (not taking into account the w ordinate). More...
static Type | dot3 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Dot products between two vectors (not taking into account the w ordinate). More...
static Type | dot4 (const Vec4< Type > &vector1, const Vec4< Type > &vector2)
| Dot products between two vectors (taking into account the w ordinate). More...
static bool | is_equal (const Vec4< Type > &first, const Vec4< Type > &second, Type epsilon)
| Returns true if equal within the bounds of an epsilon. More...
static Vec4< Type > | normalize3 (const Vec4< Type > &vector)
| Normalizes a vector (not taking into account the w ordinate) More...
static Vec4< Type > | normalize4 (const Vec4< Type > &vector)
| Normalizes a vector (taking into account the w ordinate) More...
static Vec4< Type > | rotate3 (const Vec4< Type > &vector, const Angle &angle, const Vec4< Type > &axis)
| Rotate a vector around an axis. Same as glRotate[f|d](angle, a);. More...
static Vec4< Type > | round (const Vec4< Type > &vector)
| Rounds all components on a vector. More...
Public Attributes inherited from clan::Vec4< Type >
union {
Type clan::Vec4< Type >::r
Type clan::Vec4< Type >::s
Type clan::Vec4< Type >::x
}; |
union {
Type clan::Vec4< Type >::g
Type clan::Vec4< Type >::t
Type clan::Vec4< Type >::y
}; |
union {
Type clan::Vec4< Type >::b
Type clan::Vec4< Type >::u
Type clan::Vec4< Type >::z
}; |
union {
Type clan::Vec4< Type >::a
Type clan::Vec4< Type >::v
Type clan::Vec4< Type >::w
}; |

## Detailed Description

Floating point color description class (for float).

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

- color.h