Scene Fusion 2 API Reference
ksColor.h
1 /*************************************************************************
2  *
3  * KINEMATICOUP CONFIDENTIAL
4  * __________________
5  *
6  * Copyright (2016-2021) KinematicSoup Technologies Incorporated
7  * All Rights Reserved.
8  *
9  * NOTICE: All information contained herein is, and remains
10  * the property of KinematicSoup Technologies Incorporated and its
11  * suppliers, if any. The intellectual and technical concepts contained
12  * herein are proprietary to KinematicSoup Technologies Incorporated
13  * and its suppliers and may be covered by Canadian and Foreign Patents,
14  * patents in process, and are protected by trade secret or copyright law.
15  * Dissemination of this information or reproduction of this material
16  * is strictly forbidden unless prior written permission is obtained
17  * from KinematicSoup Technologies Incorporated.
18  */
19 #pragma once
20 
21 namespace KS {
26  struct ksColor
27  {
28  public:
32  ksColor() :
33  m_r{ 0.0f },
34  m_g{ 0.0f },
35  m_b{ 0.0f },
36  m_a{ 1.0f }
37  {
38  }
39 
45  ksColor(const ksColor& other) :
46  m_r{ other.m_r },
47  m_g{ other.m_g },
48  m_b{ other.m_b },
49  m_a{ other.m_a }
50  {
51  }
52 
61  ksColor(float r, float g, float b, float a = 1.0f) :
62  m_r{ r },
63  m_g{ g },
64  m_b{ b },
65  m_a{ a }
66  {
67  }
68 
72  ~ksColor() {}
73 
77  float& R() { return m_r; }
78 
82  const float& R() const { return m_r; }
83 
87  float& G() { return m_g; }
88 
92  const float& G() const { return m_g; }
93 
97  float& B() { return m_b; }
98 
102  const float& B() const { return m_b; }
103 
107  float& A() { return m_a; }
108 
112  const float& A() const { return m_a; }
113 
114  private:
115  float m_r;
116  float m_g;
117  float m_b;
118  float m_a;
119  };
120 } // KS
Definition: sfDictionaryProperty.h:24
Definition: ksColor.h:27
const float & B() const
Definition: ksColor.h:102
ksColor(const ksColor &other)
Definition: ksColor.h:45
ksColor(float r, float g, float b, float a=1.0f)
Definition: ksColor.h:61
ksColor()
Definition: ksColor.h:32
const float & G() const
Definition: ksColor.h:92
float & G()
Definition: ksColor.h:87
const float & A() const
Definition: ksColor.h:112
float & R()
Definition: ksColor.h:77
float & B()
Definition: ksColor.h:97
~ksColor()
Definition: ksColor.h:72
const float & R() const
Definition: ksColor.h:82
float & A()
Definition: ksColor.h:107