forked from picciau-g/superfacets-2d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolormapper.h
executable file
·75 lines (64 loc) · 1.63 KB
/
colormapper.h
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
64
65
66
67
68
69
70
71
72
73
74
75
/*
*
* 2014
* Author: Giulia Picciau - DIBRIS, Università degli studi di Genova
* Supervisors: Leila De Floriani - DIBRIS, Università degli studi di Genova
* Patricio Simari - Department of Electrical Engineering and Computer Science, The Catholic University of America
*
* Title: Fast and scalable mesh superfacets
* Submission to Pacific Graphics 2014
*
*
**/
#ifndef COLORMAPPER_H
#define COLORMAPPER_H
#include <math.h>
#include <iostream>
/**
*
* @author Giulia Picciau - Università degli studi di Genova
*
* @date 2014
*
* @brief ColorMapper class generates a colormap to assign a different color to faces of a mesh depending on
* which cluster they belong to
*
*
*/
class ColorMapper
{
public:
//Constructor
ColorMapper();
/**
* @brief ColorMapper Constructor
* @param num The number of regions of the segmentation
*/
ColorMapper(int num);
ColorMapper(float max, int count);
/*
* Functions to assign the color to a triangle depending on the region to which it belongs
*/
void setRed(int);
void setGreen(int);
void setBlue(int);
void setRed(float);
void setGreen(float);
void setBlue(float);
/*
*Color intensities
*/
float red;
float green;
float blue;
//Number of different colors required (=number of regions)
int numColors;
//sampling interval on the hue circumference
float stepHue;
//Value and saturation (default=1.0)
float value;
float saturation;
//hue of the triangle (depends on the region)
float hue;
};
#endif // COLORMAPPER_H