mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-12 22:39:09 -05:00
Rename preSync and postSync in InteractionHandler to more descriptive names
This commit is contained in:
@@ -173,9 +173,8 @@ public:
|
||||
void unlockControls();
|
||||
|
||||
//void update(double deltaTime);
|
||||
|
||||
void preSynchronization(double deltaTime);
|
||||
void postSynchronizationPreDraw();
|
||||
void updateCamera();
|
||||
void updateInputStates(double timeSinceLastUpdate);
|
||||
|
||||
void serialize(SyncBuffer* syncBuffer);
|
||||
void deserialize(SyncBuffer* syncBuffer);
|
||||
|
||||
@@ -768,15 +768,13 @@ void OpenSpaceEngine::preSynchronization() {
|
||||
|
||||
_scriptEngine->preSynchronization();
|
||||
|
||||
// Update the mouse velocities for interaction handler
|
||||
_interactionHandler->preSynchronization(dt);
|
||||
_interactionHandler->updateInputStates(dt);
|
||||
|
||||
_parallelConnection->preSynchronization();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
|
||||
if (_isInShutdownMode) {
|
||||
if (_shutdownCountdown <= 0.f) {
|
||||
_windowWrapper->terminate();
|
||||
@@ -795,7 +793,8 @@ void OpenSpaceEngine::postSynchronizationPreDraw() {
|
||||
_renderEngine->camera()->invalidateCache();
|
||||
|
||||
// Step the camera using the current mouse velocities which are synced
|
||||
_interactionHandler->postSynchronizationPreDraw();
|
||||
_interactionHandler->updateCamera();
|
||||
|
||||
|
||||
|
||||
#ifdef OPENSPACE_MODULE_ONSCREENGUI_ENABLED
|
||||
|
||||
@@ -770,19 +770,13 @@ void InteractionHandler::unlockControls() {
|
||||
|
||||
}
|
||||
|
||||
void InteractionHandler::preSynchronization(double deltaTime) {
|
||||
void InteractionHandler::updateInputStates(double timeSinceLastUpdate) {
|
||||
ghoul_assert(_inputState != nullptr, "InputState cannot be null!");
|
||||
ghoul_assert(_camera != nullptr, "Camera cannot be null!");
|
||||
|
||||
if (_cameraUpdatedFromScript) {
|
||||
_cameraUpdatedFromScript = false;
|
||||
}
|
||||
else {
|
||||
_currentInteractionMode->updateMouseStatesFromInput(*_inputState, deltaTime);
|
||||
}
|
||||
_currentInteractionMode->updateMouseStatesFromInput(*_inputState, timeSinceLastUpdate);
|
||||
}
|
||||
|
||||
void InteractionHandler::postSynchronizationPreDraw() {
|
||||
void InteractionHandler::updateCamera() {
|
||||
ghoul_assert(_inputState != nullptr, "InputState cannot be null!");
|
||||
ghoul_assert(_camera != nullptr, "Camera cannot be null!");
|
||||
|
||||
@@ -795,7 +789,6 @@ void InteractionHandler::postSynchronizationPreDraw() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SceneGraphNode* const InteractionHandler::focusNode() const {
|
||||
return _currentInteractionMode->focusNode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user