-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColor.h
More file actions
63 lines (49 loc) · 1.4 KB
/
Color.h
File metadata and controls
63 lines (49 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef CSE167_Color_h
#define CSE167_Color_h
class Color
{
protected:
float c[4];
unsigned char u8bit = 0xFF;
public:
Color(void);
Color(float r, float g, float b);
Color(float r, float g, float b, float a);
Color(unsigned int hex);
~Color(void);
float* ptr(void);
float& operator [] (int);
//Mathematical operations on colors
Color interpolate(Color&, float);
//Add
//Subtract
//Scalar Multiplication
//Component-wise Multiplication
//Clamping
//Etc.
//Pre-Defined Colors
static Color red(void);
static Color blue(void);
static Color green(void);
static Color yellow(void);
static Color orange(void);
static Color purple(void);
static Color white(void);
static Color black(void);
static Color lightBrown(void);
//Randomized Colors
static Color randomPastel(void);
static Color randomDarkPastel(void);
static Color randomBrightPastel(void);
static Color randomDarkShade(void);
//Used by Light
static Color ambientDefault(void);
static Color diffuseDefault(void);
static Color specularDefault(void);
//Used by Material
static Color ambientMaterialDefault(void);
static Color diffuseMaterialDefault(void);
static Color specularMaterialDefault(void);
static Color emissionMaterialDefault(void);
};
#endif