1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-10-31 21:05:38 +01:00
GiantsTools/Sdk/Include/Core/Public/GLUtil.h

23 lines
523 B
C
Raw Normal View History

2021-01-24 00:40:09 +01:00
#pragma once
// Return a new point in the coordinate system typically used by OpenGL applications.
inline P3D GameToGLPoint(const P3D& gamePoint)
{
P3D newPoint;
newPoint.x = gamePoint.x * -1.0f;
newPoint.y = gamePoint.z;
newPoint.z = gamePoint.y;
return newPoint;
}
// Return a new point in the game's coordinate system from an OpenGL point.
inline static P3D GLToGamePoint(const P3D& glPoint)
{
P3D newPoint;
newPoint.x = glPoint.x * -1.0f;
newPoint.z = glPoint.y;
newPoint.y = glPoint.z;
return newPoint;
}