File: color.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (42 lines) | stat: -rw-r--r-- 982 bytes parent folder | download | duplicates (2)
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
#pragma once
#include "graphics/2d.h"
#include "graphics/color.h"
#include "globalincs/pstypes.h"
#include "globalincs/vmallocator.h"

class hdr_color{
	private:
	float red,green,blue,alpha,intensity;
public:
	hdr_color();
	hdr_color(const  float new_r, const  float new_g, const  float new_b, const float new_a = 1.0f, const  float new_i =1.0f);
	hdr_color(const hdr_color* const source_color);

	void reset();

	void get_v5f(SCP_vector<float>& outvec) const;
	void set_vecf(const SCP_vector<float>& input);

	void set_rgb(const int new_r,const int new_g,const int new_b);
	void set_rgb(const color* const new_rgb);
	void set_rgb(const int* const new_rgb);

	float r() const;
	float r(const float in);
	float r(const int in);

	float g() const;
	float g(const float in);
	float g(const int in);

	float b() const;
	float b(const float in);
	float b(const int in);

	float a() const;
	float a(const float in);
	float a(const int in);

	float i() const;
	float i(const float in);
};