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) {
155 for (std::size_t i = 0; i <
kTotal; ++i) {
163 for (std::size_t i = 0; i <
kTotal; ++i) {
180 for (std::size_t i = 0; i <
kTotal; ++i) {
188 for (std::size_t i = 0; i <
kTotal; ++i) {
205 for (std::size_t i = 0; i <
kTotal; ++i) {
213 for (std::size_t i = 0; i <
kTotal; ++i) {
222 for (std::size_t i = 0; i <
kTotal; ++i) {
230 for (std::size_t i = 0; i <
kTotal; ++i) {
239 for (std::size_t i = 0; i <
kTotal; ++i) {
247 for (std::size_t i = 0; i <
kTotal; ++i) {
256 for (std::size_t i = 0; i <
kTotal; ++i) {
264 for (std::size_t i = 0; i <
kTotal; ++i) {
270 [[nodiscard]] std::uint32_t
ToInt()
const;
280 static_assert(
sizeof(
NiColor) == 0xC);
310 red(std::move(a_rhs.red)),
311 green(std::move(a_rhs.green)),
312 blue(std::move(a_rhs.blue)),
313 alpha(std::move(a_rhs.alpha))
316 constexpr
NiColorA(
float a_red,
float a_green,
float a_blue,
float a_alpha) noexcept :
328 if (
this != std::addressof(a_rhs)) {
339 if (
this != std::addressof(a_rhs)) {
340 red = std::move(a_rhs.red);
341 green = std::move(a_rhs.green);
342 blue = std::move(a_rhs.blue);
343 alpha = std::move(a_rhs.alpha);
352 for (std::size_t i = 0; i <
kTotal; ++i) {
353 if (a_lhs[i] != a_rhs[i]) {
362 return !(a_lhs == a_rhs);
365 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
368 return std::addressof(
red)[a_idx];
371 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
374 return std::addressof(
red)[a_idx];
380 for (std::size_t i = 0; i <
kTotal; ++i) {
388 for (std::size_t i = 0; i <
kTotal; ++i) {
397 for (std::size_t i = 0; i <
kTotal; ++i) {
405 for (std::size_t i = 0; i <
kTotal; ++i) {
419 static_assert(
sizeof(
NiColorA) == 0x10);
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: NiColor.h:283
float alpha
Definition: NiColor.h:415
constexpr friend bool operator!=(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:360
~NiColorA() noexcept=default
constexpr NiColorA() noexcept
Definition: NiColor.h:295
constexpr friend bool operator==(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:350
@ kTotal
Definition: NiColor.h:292
@ kRed
Definition: NiColor.h:287
@ kBlue
Definition: NiColor.h:289
@ kAlpha
Definition: NiColor.h:290
@ kGreen
Definition: NiColor.h:288
constexpr NiColorA & operator=(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:326
NiColorA & operator/=(float a_value) noexcept
Definition: NiColor.h:403
constexpr NiColorA & operator=(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:337
float blue
Definition: NiColor.h:414
constexpr NiColorA(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:309
float red
Definition: NiColor.h:412
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:371
NiColorA & operator*=(float a_value) noexcept
Definition: NiColor.h:386
constexpr NiColorA(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:302
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:365
NiColorA operator/(float a_value) const noexcept
Definition: NiColor.h:394
constexpr NiColorA(float a_red, float a_green, float a_blue, float a_alpha) noexcept
Definition: NiColor.h:316
NiColorA(const Color &a_rhs)
NiColorA operator*(float a_value) const noexcept
Definition: NiColor.h:377
float green
Definition: NiColor.h:413
std::string ToHex() const
NiColor & operator+=(float a_value) noexcept
Definition: NiColor.h:211
constexpr NiColor(NiColor &&a_rhs) noexcept
Definition: NiColor.h:34
std::uint32_t ToInt() const
NiColor & operator*=(float a_value) noexcept
Definition: NiColor.h:245
float red
Definition: NiColor.h:274
constexpr NiColor & operator=(NiColor &&a_rhs) noexcept
Definition: NiColor.h:66
NiColor & operator-=(float a_value) noexcept
Definition: NiColor.h:228
NiColor & operator+=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:114
float green
Definition: NiColor.h:275
float blue
Definition: NiColor.h:276
~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:144
NiColor & operator-=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:131
NiColor operator-(float a_value) const noexcept
Definition: NiColor.h:219
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:177
NiColor operator-()
Definition: NiColor.h:139
NiColor operator/(float a_value) const noexcept
Definition: NiColor.h:253
constexpr NiColor(const NiColor &a_rhs) noexcept
Definition: NiColor.h:28
friend NiColor operator/(float a_lhs, const NiColor &a_rhs)
Definition: NiColor.h:194
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:202
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:262
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:152
NiColor & operator/=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:186
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:169
@ kBlue
Definition: NiColor.h:17
@ kGreen
Definition: NiColor.h:16
@ kRed
Definition: NiColor.h:15
@ kTotal
Definition: NiColor.h:19
NiColor & operator*=(const NiColor &a_rhs) noexcept
Definition: NiColor.h:161
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:236
constexpr NiColor() noexcept
Definition: NiColor.h:22
Definition: AbsorbEffect.h:6
string(const CharT(&)[N]) -> string< CharT, N - 1 >