MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / refreshMovementKeyCache

Method refreshMovementKeyCache

src/visualizer/input/input_controller.cpp:470–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 }
469
470 void InputController::refreshMovementKeyCache() {
471 for (size_t i = 0; i < input::kToolModeCount; ++i) {
472 const auto mode = static_cast<input::ToolMode>(i);
473 auto& mk = movement_keys_per_mode_[i];
474 mk.forward = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_FORWARD, mode);
475 mk.backward = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_BACKWARD, mode);
476 mk.left = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_LEFT, mode);
477 mk.right = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_RIGHT, mode);
478 mk.up = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_UP, mode);
479 mk.down = bindings_.getKeyForAction(input::Action::CAMERA_MOVE_DOWN, mode);
480 }
481 }
482
483 const InputController::MovementKeys& InputController::currentMovementKeys() const {
484 return movement_keys_per_mode_[static_cast<size_t>(getCurrentToolMode())];

Callers

nothing calls this directly

Calls 1

getKeyForActionMethod · 0.80

Tested by

no test coverage detected