43 return this->
m_data[index];
48 return this->
m_data[index];
61 if (key ==
'a' && this->
m_size == 4)
77 if (key ==
'a' && this->
m_size == 4)
95 void set(T r, T g, T b)
119 Color3ub(
unsigned char r,
unsigned char g,
unsigned char b);
136 void set(T r, T g, T b, T a)
160 Color4ub(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a);
The class Color3 is a templated class inheriting from the Color class. A Color3 object holds 3 elemen...
Definition color.h:87
void set(T r, T g, T b)
Sets the (r,g,b) values of current Color3 object.
Definition color.h:95
Color3()
Contructs a Color3 object with 3 elements.
Definition color.h:90
The Color3f class inherits from Color3, specilizing the template parameters to float for element type...
Definition color.h:105
Color3f(const Color4f &other)
Color3f(const Color4ub &other)
Color3f(const Color3ub &other)
Constructs a Color3f of (r, g, b) by copying the values of another Color3ub object and dividing these...
Color3f(float r, float g, float b)
Constructs a Color3f object, and set its elements to parameters (r, g, b).
Color3f()
Constructs a Color3f object, and initializes it to (1.0f, 1.0f, 1.0f).
Color3f(const Color3f &other)
The Color3ub class inherits from Color3, specilizing the template parameters to unsigned char for ele...
Definition color.h:116
Color3ub(const Color4ub &other)
Color3ub(unsigned char r, unsigned char g, unsigned char b)
Constructs a Color3ub object, and set its elements to parameters (r, g, b).
Color3ub()
Constructs a Color3ub object, and initializes it to (255, 255, 255).
Color3ub(const Color3ub &other)
Color3ub(const Color3f &other)
Constructs a Color3f of (r, g, b) by copying the values of another Color3ub object and multiplying th...
Color3ub(const Color4f &other)
The class Color4 is a templated class inheriting from the Color class. A Color4 object holds 4 elemen...
Definition color.h:128
Color4()
Contructs a Color4 object with 4 elements.
Definition color.h:131
void set(T r, T g, T b, T a)
Sets the (r, g, b, a) values of current Color4 object.
Definition color.h:136
The Color4f class inherits from Color4, specilizing the template parameters to float for element type...
Definition color.h:146
Color4f(const Color4ub &other)
Constructs a Color4f of (r, g, b, a) by copying the values of another Color4ub object and dividing th...
Color4f()
Constructs a Color4f object, and initializes it to (1.0f, 1.0f, 1.0f, 1.0f).
Color4f(const Color4f &other)
Color4f(const Color3f &other)
Constructs a Color4f of (r, g, b, a) by copying the (r, g, b) of another Color3ub object and setting ...
Color4f(float r, float g, float b, float a)
Constructs a Color4f object, and set its elements to parameters (r, g, b, a).
Color4f(const Color3ub &other)
The Color4ub class inherits from Color4, specilizing the template parameters to unsigned char for ele...
Definition color.h:157
Color4ub(const Color3ub &other)
Color4ub(const Color4ub &other)
Color4ub(const Color3f &other)
Constructs a Color4ub of (r, g, b, a) by copying the (r, g, b) of another Color3ub object and setting...
Color4ub(const Color4f &other)
Constructs a Color4ub of (r, g, b, a) by copying the values of another Color4f object and multiplying...
Color4ub()
Constructs a Color4ub object, and initializes it to (255, 255, 255, 255).
Color4ub(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
Constructs a Color4ub object, and set its elements to paramters (r, g, b, a).
The Color is a templated class that inherits publicly from a class named Tuple<T>.
Definition color.h:32
Color(int size)
Constructs a Color object with a specified number of elements.
Definition color.h:36
T & operator[](int index)
Provides read-write access to the element at a specific index(position) within the Color object.
Definition color.h:46
const T & operator[](char key) const
Provides read-only access to a element within the Color object using a character key.
Definition color.h:53
const T & operator[](int index) const
Provides read-only access to the element at a specific index(position) within the Color object.
Definition color.h:41
T & operator[](char key)
Provides read-write access to a element within the Color object using a character key.
Definition color.h:69
The Tuple is a templated class inheriting from the most basic class Variant.
Definition tuple.h:27
int m_size
The number of elements that the data array of the Tuple holds.
Definition tuple.h:36
T * m_data
The data array of the Tuple.
Definition tuple.h:35
int size() const
Gets the number of elements of the Tuple.
Definition tuple.h:54