1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-12-23 07:47:22 +01:00
GiantsTools/Sdk/Include/Core/Public/GLUtil.h
2021-01-23 15:40:09 -08:00

23 lines
523 B
C

#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;
}