Using morphable and freecam controllers in example app, blending matrices using vectors, improvements regarding updating projection matrices, removed FreeCam components from MorphableController, renamed variable to m_targetMorphStatePerspective, setting target morph state using setter

This commit is contained in:
Vladyslav Baranovskyi
2024-06-26 14:00:21 +03:00
parent 1fbd072429
commit a696ae2c7f
4 changed files with 27 additions and 71 deletions

View File

@@ -18,17 +18,8 @@ namespace OpenVulkano::Scene
double m_animationDuration;
double m_currentTime;
bool m_isMorphing;
bool m_targetMorphState; // true for perspective, false for orthographic
bool m_targetMorphStatePerspective; // true for perspective, false for orthographic
float m_yaw = 0, m_pitch = 0, m_boostFactor = 2;
Math::Vector3f_SIMD m_position = { 0, 0, 0 };
Input::InputAction* m_actionForward;
Input::InputAction* m_actionSide;
Input::InputAction* m_actionUp;
Input::InputAction* m_actionLookUp;
Input::InputAction* m_actionLookSide;
Input::InputAction* m_actionBoost;
Input::InputAction* m_actionMorph;
bool m_wasMorphingKeyDown = false;
@@ -37,10 +28,10 @@ namespace OpenVulkano::Scene
void Init(MorphableCamera* camera);
void Tick() override;
void SetDefaultKeybindings();
void SetDuration(double duration) { m_animationDuration = duration; }
double GetDuration() { return m_animationDuration; }
void SetTargetState(bool toPerspective) { m_targetMorphStatePerspective = toPerspective; }
void Reset() { m_currentTime = 0; }
};
}