defined union/struct at Color3f/4f

This commit is contained in:
hyzboy 2022-03-11 17:48:59 +08:00
parent 1aa976a30a
commit afec00dc90
2 changed files with 18 additions and 2 deletions

View File

@ -12,7 +12,15 @@ namespace hgl
public:
float r,g,b; ///<rgb 三原色
union
{
struct
{
float r,g,b; ///<rgb 三原色
};
float rgb[3];
};
public:

View File

@ -25,7 +25,15 @@ namespace hgl
public:
float r,g,b,a; ///<rgba 4原色
union
{
struct
{
float r,g,b,a; ///<rgba 4原色
};
float rgba[4];
};
public: