MCPcopy Create free account
hub / github.com/assimp/assimp / SetupFPSView

Function SetupFPSView

tools/assimp_view/assimp_view.cpp:690–704  ·  view source on GitHub ↗

------------------------------------------------------------------------------- Switch between zoom/rotate view and the standard FPS view g_bFPSView specifies the view mode to setup -------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

688// g_bFPSView specifies the view mode to setup
689//-------------------------------------------------------------------------------
690int SetupFPSView() {
691 if (!g_bFPSView) {
692 g_sCamera.vPos = aiVector3D(0.0f, 0.0f, g_fWheelPos);
693 g_sCamera.vLookAt = aiVector3D(0.0f, 0.0f, 1.0f);
694 g_sCamera.vUp = aiVector3D(0.0f, 1.0f, 0.0f);
695 g_sCamera.vRight = aiVector3D(0.0f, 1.0f, 0.0f);
696 } else {
697 g_fWheelPos = g_sCamera.vPos.z;
698 g_sCamera.vPos = aiVector3D(0.0f, 0.0f, -10.0f);
699 g_sCamera.vLookAt = aiVector3D(0.0f, 0.0f, 1.0f);
700 g_sCamera.vUp = aiVector3D(0.0f, 1.0f, 0.0f);
701 g_sCamera.vRight = aiVector3D(0.0f, 1.0f, 0.0f);
702 }
703 return 1;
704}
705
706//-------------------------------------------------------------------------------
707// Initialize the IDIrect3D interface

Callers 1

ToggleFPSViewFunction · 0.85

Calls 1

aiVector3DClass · 0.85

Tested by

no test coverage detected