mirror of
https://github.com/ncblakely/GiantsTools
synced 2024-11-23 14:45:37 +01:00
23 lines
523 B
C
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;
|
||
|
}
|