diff options
Diffstat (limited to 'src/math/color.h')
-rw-r--r-- | src/math/color.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/math/color.h b/src/math/color.h index 7fa0d68..0dd5fc8 100644 --- a/src/math/color.h +++ b/src/math/color.h @@ -46,7 +46,10 @@ public: /// multiply rgb values with scalar value. Color operator*(const float scalar) const; - /// clam color values to the 0-1 range + /// pointer to the internal data + inline float *ptr() const { return (float *) rgba_data; }; + + /// clamp color values to the 0-1 range void clamp(); float &r; @@ -54,6 +57,8 @@ public: float &b; float &a; + +private: float rgba_data[4]; }; |