Plasma Engine  2.0
Loading...
Searching...
No Matches
Color16f.h
1#pragma once
2
3#include <Foundation/Math/Color.h>
4#include <Foundation/Math/Float16.h>
5
10class PL_FOUNDATION_DLL plColorLinear16f
11{
12public:
13 // Means that colors can be copied using memcpy instead of copy construction.
14 PL_DECLARE_POD_TYPE();
15
16 // *** Data ***
17public:
18 plFloat16 r;
19 plFloat16 g;
20 plFloat16 b;
21 plFloat16 a;
22
23 // *** Constructors ***
24public:
26 plColorLinear16f(); // [tested]
27
30
32 plColorLinear16f(const plColor& color); // [tested]
33
34 // no copy-constructor and operator= since the default-generated ones will be faster
35
36 // *** Functions ***
37public:
39 plColor ToLinearFloat() const; // [tested]
40
42 const plFloat16* GetData() const { return &r; }
43
45 plFloat16* GetData() { return &r; }
46};
47
48#include <Foundation/Math/Implementation/Color16f_inl.h>
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
A 16bit per channel float color storage format.
Definition Color16f.h:11
plColorLinear16f()
default-constructed color is uninitialized (for speed)
const plFloat16 * GetData() const
Conversion to const plFloat16*.
Definition Color16f.h:42
plFloat16 * GetData()
Conversion to plFloat16* - use with care!
Definition Color16f.h:45
A 16 bit IEEE float class. Often called "half".
Definition Float16.h:11