Fix misspelling (Handness -> Handedness) (#2845)

This commit is contained in:
Cleroth
2022-07-19 18:13:40 +01:00
committed by GitHub
parent 9022ffcb64
commit cbf17e000f

View File

@@ -120,7 +120,7 @@ static bx::Vec3 s_axisVectors[6] =
struct CoordinateSystem
{
bx::Handness::Enum m_handness;
bx::Handedness::Enum m_handedness;
Axis::Enum m_up;
Axis::Enum m_forward;
};
@@ -133,10 +133,10 @@ struct CoordinateSystemMapping
static const CoordinateSystemMapping s_coordinateSystemMappings[] =
{
{ "lh-up+y", { bx::Handness::Left, Axis::PositiveY, Axis::PositiveZ } },
{ "lh-up+z", { bx::Handness::Left, Axis::PositiveZ, Axis::PositiveY } },
{ "rh-up+y", { bx::Handness::Right, Axis::PositiveY, Axis::PositiveZ } },
{ "rh-up+z", { bx::Handness::Right, Axis::PositiveZ, Axis::PositiveY } },
{ "lh-up+y", { bx::Handedness::Left, Axis::PositiveY, Axis::PositiveZ } },
{ "lh-up+z", { bx::Handedness::Left, Axis::PositiveZ, Axis::PositiveY } },
{ "rh-up+y", { bx::Handedness::Right, Axis::PositiveY, Axis::PositiveZ } },
{ "rh-up+z", { bx::Handedness::Right, Axis::PositiveZ, Axis::PositiveY } },
};
struct Mesh
@@ -459,7 +459,7 @@ void mtxCoordinateTransform(float* _result, const CoordinateSystem& _cs)
bx::Vec3 forward = s_axisVectors[_cs.m_forward];
bx::Vec3 right = cross(forward,up);
if (_cs.m_handness == bx::Handness::Left)
if (_cs.m_handedness == bx::Handedness::Left)
{
right = bx::mul(right, -1.0f);
}
@@ -505,7 +505,7 @@ void parseObj(char* _data, uint32_t _size, Mesh* _mesh, bool _hasBc)
// https://en.wikipedia.org/wiki/Wavefront_.obj_file
// Coordinate system is right-handed, but up/forward is not defined, but +Y Up, +Z Forward seems to be a common default
_mesh->m_coordinateSystem.m_handness = bx::Handness::Right;
_mesh->m_coordinateSystem.m_handedness = bx::Handedness::Right;
_mesh->m_coordinateSystem.m_up = Axis::PositiveY;
_mesh->m_coordinateSystem.m_forward = Axis::PositiveZ;
@@ -882,7 +882,7 @@ void parseGltf(char* _data, uint32_t _size, Mesh* _mesh, bool _hasBc, const bx::
// - Gltf 2.0 specification
// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0
_mesh->m_coordinateSystem.m_handness = bx::Handness::Right;
_mesh->m_coordinateSystem.m_handedness = bx::Handedness::Right;
_mesh->m_coordinateSystem.m_forward = Axis::PositiveZ;
_mesh->m_coordinateSystem.m_up = Axis::PositiveY;
@@ -1037,7 +1037,7 @@ int main(int _argc, const char* _argv[])
bool hasBc = cmdLine.hasArg("barycentric");
CoordinateSystem outputCoordinateSystem;
outputCoordinateSystem.m_handness = bx::Handness::Left;
outputCoordinateSystem.m_handedness = bx::Handedness::Left;
outputCoordinateSystem.m_forward = Axis::PositiveZ;
outputCoordinateSystem.m_up = Axis::PositiveY;
for (uint32_t ii = 0; ii < BX_COUNTOF(s_coordinateSystemMappings); ++ii)