35 red(std::move(a_rhs.red)),
36 green(std::move(a_rhs.green)),
37 blue(std::move(a_rhs.blue))
40 constexpr
NiColor(
float a_red,
float a_green,
float a_blue) noexcept :
46 constexpr
NiColor(std::uint32_t a_hexValue) noexcept :
47 red(((a_hexValue >> 16) & 0xFF) / 255.0f),
48 green(((a_hexValue >> 8) & 0xFF) / 255.0f),
49 blue(((a_hexValue)&0xFF) / 255.0f)
58 if (
this != std::addressof(a_rhs)) {
68 if (
this != std::addressof(a_rhs)) {
69 red = std::move(a_rhs.red);
70 green = std::move(a_rhs.green);
71 blue = std::move(a_rhs.blue);
80 for (std::size_t i = 0; i <
kTotal; ++i) {
81 if (a_lhs[i] != a_rhs[i]) {
90 return !(a_lhs == a_rhs);
93 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
96 return std::addressof(
red)[a_idx];
99 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
102 return std::addressof(
red)[a_idx];
108 for (std::size_t i = 0; i <
kTotal; ++i) {
116 for (std::size_t i = 0; i <
kTotal; ++i) {
125 for (std::size_t i = 0; i <
kTotal; ++i) {
133 for (std::size_t i = 0; i <
kTotal; ++i) {
150 for (std::size_t i = 0; i <
kTotal; ++i) {
158 for (std::size_t i = 0; i <
kTotal; ++i) {
175 for (std::size_t i = 0; i <
kTotal; ++i) {
183 for (std::size_t i = 0; i <
kTotal; ++i) {
200 for (std::size_t i = 0; i <
kTotal; ++i) {
208 for (std::size_t i = 0; i <
kTotal; ++i) {
217 for (std::size_t i = 0; i <
kTotal; ++i) {
225 for (std::size_t i = 0; i <
kTotal; ++i) {
234 for (std::size_t i = 0; i <
kTotal; ++i) {
242 for (std::size_t i = 0; i <
kTotal; ++i) {
251 for (std::size_t i = 0; i <
kTotal; ++i) {
259 for (std::size_t i = 0; i <
kTotal; ++i) {
265 [[nodiscard]] std::uint32_t
ToInt()
const;
273 static_assert(
sizeof(
NiColor) == 0xC);
303 red(std::move(a_rhs.red)),
304 green(std::move(a_rhs.green)),
305 blue(std::move(a_rhs.blue)),
306 alpha(std::move(a_rhs.alpha))
309 constexpr
NiColorA(
float a_red,
float a_green,
float a_blue,
float a_alpha) noexcept :
321 if (
this != std::addressof(a_rhs)) {
332 if (
this != std::addressof(a_rhs)) {
333 red = std::move(a_rhs.red);
334 green = std::move(a_rhs.green);
335 blue = std::move(a_rhs.blue);
336 alpha = std::move(a_rhs.alpha);
345 for (std::size_t i = 0; i <
kTotal; ++i) {
346 if (a_lhs[i] != a_rhs[i]) {
355 return !(a_lhs == a_rhs);
358 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
361 return std::addressof(
red)[a_idx];
364 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
367 return std::addressof(
red)[a_idx];
373 for (std::size_t i = 0; i <
kTotal; ++i) {
381 for (std::size_t i = 0; i <
kTotal; ++i) {
390 for (std::size_t i = 0; i <
kTotal; ++i) {
398 for (std::size_t i = 0; i <
kTotal; ++i) {
410 static_assert(
sizeof(
NiColorA) == 0x10);
Definition: NiColor.h:276
float alpha
Definition: NiColor.h:408
constexpr friend bool operator!=(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:353
~NiColorA() noexcept=default
constexpr NiColorA() noexcept
Definition: NiColor.h:288
constexpr friend bool operator==(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:343
constexpr NiColorA & operator=(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:319
NiColorA & operator/=(float a_value) noexcept
Definition: NiColor.h:396
constexpr NiColorA & operator=(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:330
float blue
Definition: NiColor.h:407
constexpr NiColorA(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:302
float red
Definition: NiColor.h:405
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:364
NiColorA & operator*=(float a_value) noexcept
Definition: NiColor.h:379
constexpr NiColorA(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:295
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:358
NiColorA operator/(float a_value) const noexcept
Definition: NiColor.h:387
constexpr NiColorA(float a_red, float a_green, float a_blue, float a_alpha) noexcept
Definition: NiColor.h:309
NiColorA(const Color &a_rhs)
@ kTotal
Definition: NiColor.h:285
@ kRed
Definition: NiColor.h:280
@ kBlue
Definition: NiColor.h:282
@ kAlpha
Definition: NiColor.h:283
@ kGreen
Definition: NiColor.h:281
NiColorA operator*(float a_value) const noexcept
Definition: NiColor.h:370
float green
Definition: NiColor.h:406
std::string ToHex() const
NiColor & operator+=(float a_value) noexcept
Definition: NiColor.h:206
constexpr NiColor(NiColor &&a_rhs) noexcept
Definition: NiColor.h:34
std::uint32_t ToInt() const
NiColor & operator*=(float a_value) noexcept
Definition: NiColor.h:240
float red
Definition: NiColor.h:269
constexpr NiColor & operator=(NiColor &&a_rhs) noexcept
Definition: NiColor.h:66
NiColor & operator-=(float a_value) noexcept
Definition: NiColor.h:223
NiColor & operator+=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:114
float green
Definition: NiColor.h:270
@ kBlue
Definition: NiColor.h:17
@ kGreen
Definition: NiColor.h:16
@ kRed
Definition: NiColor.h:15
@ kTotal
Definition: NiColor.h:19
float blue
Definition: NiColor.h:271
~NiColor() noexcept=default
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:99
friend NiColor operator-(float a_lhs, const NiColor &a_rhs)
Definition: NiColor.h:139
NiColor & operator-=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:131
NiColor operator-(float a_value) const noexcept
Definition: NiColor.h:214
constexpr friend bool operator==(const NiColor &a_lhs, const NiColor &a_rhs) noexcept
Definition: NiColor.h:78
NiColor operator/(const NiColor &a_rhs) const noexcept
Definition: NiColor.h:172
NiColor operator/(float a_value) const noexcept
Definition: NiColor.h:248
constexpr NiColor(const NiColor &a_rhs) noexcept
Definition: NiColor.h:28
friend NiColor operator/(float a_lhs, const NiColor &a_rhs)
Definition: NiColor.h:189
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:93
NiColor operator-(const NiColor &a_rhs) const noexcept
Definition: NiColor.h:122
NiColor operator+(float a_value) const noexcept
Definition: NiColor.h:197
NiColor(const Color &a_rhs)
constexpr NiColor & operator=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:56
NiColor & operator/=(float a_value) noexcept
Definition: NiColor.h:257
constexpr friend bool operator!=(const NiColor &a_lhs, const NiColor &a_rhs) noexcept
Definition: NiColor.h:88
NiColor operator*(const NiColor &a_rhs) const noexcept
Definition: NiColor.h:147
NiColor & operator/=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:181
constexpr NiColor(std::uint32_t a_hexValue) noexcept
Definition: NiColor.h:46
friend NiColor operator*(float a_lhs, const NiColor &a_rhs)
Definition: NiColor.h:164
NiColor & operator*=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:156
constexpr NiColor(float a_red, float a_green, float a_blue) noexcept
Definition: NiColor.h:40
NiColor operator+(const NiColor &a_rhs) const noexcept
Definition: NiColor.h:105
NiColor operator*(float a_value) const noexcept
Definition: NiColor.h:231
constexpr NiColor() noexcept
Definition: NiColor.h:22
Definition: AbsorbEffect.h:6
string(const CharT(&)[N]) -> string< CharT, N - 1 >