#pragma once #ifndef REAL_BUILD # include "externals.hh" #endif /*= T_Camera =================================================================*/ struct T_Camera { glm::vec3 lookAt = glm::vec3( 0 ); glm::vec3 angles = glm::vec3( 0 ); float distance = 10; float fov = 90; // Everything below is updated by update() glm::vec3 dir; glm::vec3 up; glm::vec3 pos; float np; T_Camera() { update( ); } void handleDND( ImVec2 const& move , const bool hasCtrl , const bool hasShift , const bool lmb // Left mouse button ); void handleWheel( const float wheel , const bool hasCtrl , const bool hasShift ); void makeUI( ); private: glm::mat3x3 rotMat; float rotationMatrix[ 9 ]; void update( ); };