Get debug visualizer camera yaw, pitch, dist, and target.
This commit is contained in:
@@ -984,7 +984,7 @@ void OpenGLGuiHelper::resetCamera(float camDist, float yaw, float pitch, float c
|
||||
}
|
||||
}
|
||||
|
||||
bool OpenGLGuiHelper::getCameraInfo(int* width, int* height, float viewMatrix[16], float projectionMatrix[16], float camUp[3], float camForward[3],float hor[3], float vert[3] ) const
|
||||
bool OpenGLGuiHelper::getCameraInfo(int* width, int* height, float viewMatrix[16], float projectionMatrix[16], float camUp[3], float camForward[3],float hor[3], float vert[3], float* yaw, float* pitch, float* camDist, float cameraTarget[3]) const
|
||||
{
|
||||
if (getRenderInterface() && getRenderInterface()->getActiveCamera())
|
||||
{
|
||||
@@ -1030,6 +1030,13 @@ bool OpenGLGuiHelper::getCameraInfo(int* width, int* height, float viewMatrix[16
|
||||
vert[0] = vertical[0];
|
||||
vert[1] = vertical[1];
|
||||
vert[2] = vertical[2];
|
||||
|
||||
*yaw = getRenderInterface()->getActiveCamera()->getCameraYaw();
|
||||
*pitch = getRenderInterface()->getActiveCamera()->getCameraPitch();
|
||||
*camDist = getRenderInterface()->getActiveCamera()->getCameraDistance();
|
||||
cameraTarget[0] = camTarget[0];
|
||||
cameraTarget[1] = camTarget[1];
|
||||
cameraTarget[2] = camTarget[2];
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user