Color4f.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Core
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2011, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/Base.h"
16 
17 namespace cee {
18 
19 
20 //==================================================================================================
21 //
22 // RGB float color
23 //
24 //==================================================================================================
25 class CEE_CORE_EXPORT Color4f
26 {
27 public:
28  Color4f();
29  Color4f(const Color4f& other);
30  Color4f(float r, float g, float b, float a);
31 
32  Color4f& operator=(const Color4f& rhs);
33 
34  bool operator==(const Color4f& rhs) const;
35  bool operator!=(const Color4f& rhs) const;
36 
37  const float& r() const;
38  const float& g() const;
39  const float& b() const;
40  const float& a() const;
41  float& r();
42  float& g();
43  float& b();
44  float& a();
45 
46  bool isValid() const;
47 
48 private:
49  float m_color[4];
50 };
51 
52 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
Class for storing an RGBA color.
Definition: Color4f.h:25
bool operator!=(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are different.
Definition: PtrRef.h:58
bool operator==(const PtrRef< T1 > &a, const PtrRef< T2 > &b)
Returns true if the internal pointers of refs a and b are equal.
Definition: PtrRef.h:57