Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/GameInterface/InputProcessor.cpp
Show All 38 Lines | static void Rotate(CCamera& camera, float speed) | ||||
delta = r.Rotate(delta); | delta = r.Rotate(delta); | ||||
camera.m_Orientation.Translate(-origin); | camera.m_Orientation.Translate(-origin); | ||||
camera.m_Orientation.Rotate(r); | camera.m_Orientation.Rotate(r); | ||||
camera.m_Orientation.Translate(pivot + delta); | camera.m_Orientation.Translate(pivot + delta); | ||||
} | } | ||||
bool InputProcessor::ProcessInput(GameLoopState* state) | bool InputProcessor::ProcessInput(GameLoopState* state) | ||||
{ | { | ||||
if (! g_Game) | if (! CGame::GetGame()) | ||||
return false; | return false; | ||||
CCamera* camera = g_Game->GetView()->GetCamera(); | CCamera* camera = CGame::GetGame()->GetView()->GetCamera(); | ||||
CVector3D leftwards = camera->m_Orientation.GetLeft(); | CVector3D leftwards = camera->m_Orientation.GetLeft(); | ||||
CVector3D inwards = camera->m_Orientation.GetIn(); | CVector3D inwards = camera->m_Orientation.GetIn(); | ||||
// Calculate a vector pointing forwards, parallel to the ground | // Calculate a vector pointing forwards, parallel to the ground | ||||
CVector3D forwards = inwards; | CVector3D forwards = inwards; | ||||
forwards.Y = 0.0f; | forwards.Y = 0.0f; | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator