summaryrefslogtreecommitdiff
path: root/src/rendersettings.cc
blob: ba68dc5d89e3506ea5e5596eb89260dcf5069e45 (plain)
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
#include "rendersettings.h"

RenderSettings *RenderSettings::inst(bool erase)
{
	static RenderSettings *instance = new RenderSettings;
	if (erase) {
		delete instance;
		instance = NULL;
	}
	return instance;
}

RenderSettings::RenderSettings()
{
	openCSGTermLimit = 100000;
	far_gl_clip_limit = 100000.0;
	img_width = 512;
	img_height = 512;
	this->colors[BACKGROUND_COLOR] = Color4f(0xff, 0xff, 0xe5);
	this->colors[OPENCSG_FACE_FRONT_COLOR] = Color4f(0xf9, 0xd7, 0x2c);
	this->colors[OPENCSG_FACE_BACK_COLOR] = Color4f(0x9d, 0xcb, 0x51);
	this->colors[CGAL_FACE_FRONT_COLOR] = Color4f(0xf9, 0xd7, 0x2c);
	this->colors[CGAL_FACE_BACK_COLOR] = Color4f(0x9d, 0xcb, 0x51);
	this->colors[CGAL_FACE_2D_COLOR] = Color4f(0x00, 0xbf, 0x99);
	this->colors[CGAL_EDGE_FRONT_COLOR] = Color4f(0xff, 0x00, 0x00);
	this->colors[CGAL_EDGE_BACK_COLOR] = Color4f(0xff, 0x00, 0x00);
	this->colors[CGAL_EDGE_2D_COLOR] = Color4f(0xff, 0x00, 0x00);
	this->colors[CROSSHAIR_COLOR] = Color4f(0x80, 0x00, 0x00);
}

Color4f RenderSettings::color(RenderColor idx)
{
	return this->colors[idx];
}

void RenderSettings::setColors(const std::map<RenderColor, Color4f> &colors)
{
	this->colors = colors;
}
contact: Jan Huwald // Impressum