Add generic_color::as_color_Xf
This commit is contained in:
parent
440fa3777e
commit
ea13bba49a
1 changed files with 11 additions and 1 deletions
|
|
@ -52,6 +52,16 @@ namespace psemek::gfx
|
|||
return to_coloru8(c);
|
||||
}
|
||||
|
||||
auto as_color_3f() const
|
||||
{
|
||||
return color_3f{c[0], c[1], c[2]};
|
||||
}
|
||||
|
||||
auto as_color_4f() const
|
||||
{
|
||||
return c;
|
||||
}
|
||||
|
||||
operator color_rgb() const
|
||||
{
|
||||
return as_color_rgb();
|
||||
|
|
@ -64,7 +74,7 @@ namespace psemek::gfx
|
|||
|
||||
operator color_3f() const
|
||||
{
|
||||
return color_3f{c[0], c[1], c[2]};
|
||||
return as_color_3f();
|
||||
}
|
||||
|
||||
operator color_4f() const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue