43#include <visp3/core/vpConfig.h>
44#include <visp3/core/vpColVector.h>
46#ifdef VISP_HAVE_NLOHMANN_JSON
47#include VISP_NLOHMANN_JSON(json.hpp)
50#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
86 inline vpRGBf(
float r,
float g,
float b)
97 VP_EXPLICIT
inline vpRGBf(
float v) :
R(v),
G(v),
B(v) { }
114#if ((__cplusplus >= 201103L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L)))
128 vpRGBf &operator=(
float v);
130#if ((__cplusplus >= 201103L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201103L)))
143 bool operator==(
const vpRGBf &v)
const;
144 bool operator!=(
const vpRGBf &v)
const;
153 bool operator<(
const vpRGBf &v)
const;
154 bool operator>(
const vpRGBf &v)
const;
156 friend VISP_EXPORT std::ostream &operator<<(std::ostream &os,
const vpRGBf &rgb);
167#if ((__cplusplus >= 201703L) || (defined(_MSVC_LANG) && (_MSVC_LANG >= 201703L)))
168static_assert(std::is_trivially_assignable_v<vpRGBf, vpRGBf>);
169static_assert(std::is_trivially_copyable_v<vpRGBf>);
172#ifdef VISP_HAVE_NLOHMANN_JSON
174inline void from_json(
const nlohmann::json &j,
vpRGBf &c)
182inline void to_json(nlohmann::json &j,
const vpRGBf &c)
184 j = { c.
R, c.
G, c.
B };
Implementation of column vector and the associated operations.
vpColVector operator*(float v) const
VP_EXPLICIT vpRGBf(const vpColVector &v)
vpRGBf(float r, float g, float b)
VP_EXPLICIT vpRGBf(int v)
vpRGBf & operator=(vpRGBf &&v)=default
vpRGBf(const vpRGBf &v)=default
VP_EXPLICIT vpRGBf(float v)
vpRGBf & operator=(float v)
vpRGBf & operator=(const vpRGBf &v)=default