| 31 | } |
| 32 | |
| 33 | void Window3::InitializeCamera(float upFovDegrees, float aspectRatio, float dmin, float dmax, |
| 34 | float translationSpeed, float rotationSpeed, std::array<float, 3> const& pos, |
| 35 | std::array<float, 3> const& dir, std::array<float, 3> const& up) |
| 36 | { |
| 37 | mCamera->SetFrustum(upFovDegrees, aspectRatio, dmin, dmax); |
| 38 | Vector4<float> camPosition{ pos[0], pos[1], pos[2], 1.0f }; |
| 39 | Vector4<float> camDVector{ dir[0], dir[1], dir[2], 0.0f }; |
| 40 | Vector4<float> camUVector{ up[0], up[1], up[2], 0.0f }; |
| 41 | Vector4<float> camRVector = Cross(camDVector, camUVector); |
| 42 | mCamera->SetFrame(camPosition, camDVector, camUVector, camRVector); |
| 43 | |
| 44 | mCameraRig.ComputeWorldAxes(); |
| 45 | mCameraRig.SetTranslationSpeed(translationSpeed); |
| 46 | mCameraRig.SetRotationSpeed(rotationSpeed); |
| 47 | } |
| 48 | |
| 49 | bool Window3::OnResize(int32_t xSize, int32_t ySize) |
| 50 | { |
nothing calls this directly
no test coverage detected