2022-11-16 10:41:27 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace SH_COMP
|
|
|
|
{
|
|
|
|
|
|
|
|
struct SHVec2
|
|
|
|
{
|
|
|
|
float x, y;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct SHVec4
|
|
|
|
{
|
|
|
|
float x, y, z, w;
|
|
|
|
};
|
|
|
|
|
2023-03-02 15:17:01 +08:00
|
|
|
struct SHVec3
|
|
|
|
{
|
|
|
|
SHVec3()
|
|
|
|
:x{ 0.f }, y{ 0.f }, z{ 0.f }
|
|
|
|
{}
|
|
|
|
|
|
|
|
SHVec3(SHVec4 const& rhs)
|
|
|
|
:x{ rhs.x }, y{ rhs.y }, z{ rhs.z }
|
|
|
|
{}
|
|
|
|
|
|
|
|
SHVec3(float inx, float iny, float inz)
|
|
|
|
:x{ iny }, y{ iny }, z{ inz }
|
|
|
|
{}
|
|
|
|
|
|
|
|
float x, y, z;
|
|
|
|
};
|
|
|
|
|
2023-02-27 21:57:24 +08:00
|
|
|
struct SHVec4i
|
|
|
|
{
|
|
|
|
uint32_t x, y, z, w;
|
|
|
|
};
|
|
|
|
|
2022-11-16 10:41:27 +08:00
|
|
|
struct SHMat4
|
|
|
|
{
|
|
|
|
float data[16];
|
2023-01-22 21:47:19 +08:00
|
|
|
|
|
|
|
bool operator==(SHMat4 const& rhs) const
|
|
|
|
{
|
|
|
|
for (auto i {0}; i < 16; ++i)
|
|
|
|
{
|
|
|
|
if (data[i] != rhs.data[i])
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2022-11-16 10:41:27 +08:00
|
|
|
};
|
2023-02-27 00:56:41 +08:00
|
|
|
|
|
|
|
using IndexType = uint32_t;
|
|
|
|
|
2022-11-16 10:41:27 +08:00
|
|
|
}
|