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;
278 static_assert(
sizeof(
NiColor) == 0xC);
308 red(std::move(a_rhs.red)),
309 green(std::move(a_rhs.green)),
310 blue(std::move(a_rhs.blue)),
311 alpha(std::move(a_rhs.alpha))
314 constexpr
NiColorA(
float a_red,
float a_green,
float a_blue,
float a_alpha) noexcept :
326 if (
this != std::addressof(a_rhs)) {
337 if (
this != std::addressof(a_rhs)) {
338 red = std::move(a_rhs.red);
339 green = std::move(a_rhs.green);
340 blue = std::move(a_rhs.blue);
341 alpha = std::move(a_rhs.alpha);
350 for (std::size_t i = 0; i <
kTotal; ++i) {
351 if (a_lhs[i] != a_rhs[i]) {
360 return !(a_lhs == a_rhs);
363 [[nodiscard]] constexpr
float&
operator[](std::size_t a_idx) noexcept
366 return std::addressof(
red)[a_idx];
369 [[nodiscard]] constexpr
const float&
operator[](std::size_t a_idx)
const noexcept
372 return std::addressof(
red)[a_idx];
378 for (std::size_t i = 0; i <
kTotal; ++i) {
386 for (std::size_t i = 0; i <
kTotal; ++i) {
395 for (std::size_t i = 0; i <
kTotal; ++i) {
403 for (std::size_t i = 0; i <
kTotal; ++i) {
415 static_assert(
sizeof(
NiColorA) == 0x10);
Definition: NiColor.h:281
float alpha
Definition: NiColor.h:413
constexpr friend bool operator!=(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:358
~NiColorA() noexcept=default
constexpr NiColorA() noexcept
Definition: NiColor.h:293
constexpr friend bool operator==(const NiColorA &a_lhs, const NiColorA &a_rhs) noexcept
Definition: NiColor.h:348
@ kTotal
Definition: NiColor.h:290
@ kRed
Definition: NiColor.h:285
@ kBlue
Definition: NiColor.h:287
@ kAlpha
Definition: NiColor.h:288
@ kGreen
Definition: NiColor.h:286
constexpr NiColorA & operator=(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:324
NiColorA & operator/=(float a_value) noexcept
Definition: NiColor.h:401
constexpr NiColorA & operator=(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:335
float blue
Definition: NiColor.h:412
constexpr NiColorA(NiColorA &&a_rhs) noexcept
Definition: NiColor.h:307
float red
Definition: NiColor.h:410
constexpr const float & operator[](std::size_t a_idx) const noexcept
Definition: NiColor.h:369
NiColorA & operator*=(float a_value) noexcept
Definition: NiColor.h:384
constexpr NiColorA(const NiColorA &a_rhs) noexcept
Definition: NiColor.h:300
constexpr float & operator[](std::size_t a_idx) noexcept
Definition: NiColor.h:363
NiColorA operator/(float a_value) const noexcept
Definition: NiColor.h:392
constexpr NiColorA(float a_red, float a_green, float a_blue, float a_alpha) noexcept
Definition: NiColor.h:314
NiColorA(const Color &a_rhs)
NiColorA operator*(float a_value) const noexcept
Definition: NiColor.h:375
float green
Definition: NiColor.h:411
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 >