Color3f.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 Color3f
26 {
27 public:
28  Color3f();
29  Color3f(const Color3f& other);
30  Color3f(float r, float g, float b);
31 
32  Color3f& operator=(const Color3f& rhs);
33 
34  bool operator==(const Color3f& rhs) const;
35  bool operator!=(const Color3f& rhs) const;
36 
37  const float& r() const;
38  const float& g() const;
39  const float& b() const;
40  float& r();
41  float& g();
42  float& b();
43 
44  bool isValid() const;
45 
46 private:
47  float m_color[3];
48 };
49 
50 } // namespace cee
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppAssert.cpp:18
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
Class for storing an RGB color triplet.
Definition: Color3f.h:25