History

pull qApp spaghetti out of Avatar class

some ends of spaghetti get pushed into AvatarManger class split Camera class into Camera base and FancyCamera derivation Application::getCamera() returns Camera by refence instead of pointer

Andrew Meadows committed 9 years ago

Commit 1137bd11 parent 7505b8213 files · +131 −79Browse files

Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all

Unified · Split

interface/src/Application.cpp+5−5
@@ -1124,19 +1124,19 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1123 unmodified lines
11241124 return qApp->isHMDMode() ? 1 : 0;
11251125 });
11261126 _applicationStateDevice->setInputVariant(STATE_CAMERA_FULL_SCREEN_MIRROR, []() -> float {
1127− return qApp->getCamera()->getMode() == CAMERA_MODE_MIRROR ? 1 : 0;
1127+ return qApp->getCamera().getMode() == CAMERA_MODE_MIRROR ? 1 : 0;
11281128 });
11291129 _applicationStateDevice->setInputVariant(STATE_CAMERA_FIRST_PERSON, []() -> float {
1130− return qApp->getCamera()->getMode() == CAMERA_MODE_FIRST_PERSON ? 1 : 0;
1130+ return qApp->getCamera().getMode() == CAMERA_MODE_FIRST_PERSON ? 1 : 0;
11311131 });
11321132 _applicationStateDevice->setInputVariant(STATE_CAMERA_THIRD_PERSON, []() -> float {
1133− return qApp->getCamera()->getMode() == CAMERA_MODE_THIRD_PERSON ? 1 : 0;
1133+ return qApp->getCamera().getMode() == CAMERA_MODE_THIRD_PERSON ? 1 : 0;
11341134 });
11351135 _applicationStateDevice->setInputVariant(STATE_CAMERA_ENTITY, []() -> float {
1136− return qApp->getCamera()->getMode() == CAMERA_MODE_ENTITY ? 1 : 0;
1136+ return qApp->getCamera().getMode() == CAMERA_MODE_ENTITY ? 1 : 0;
11371137 });
11381138 _applicationStateDevice->setInputVariant(STATE_CAMERA_INDEPENDENT, []() -> float {
1139− return qApp->getCamera()->getMode() == CAMERA_MODE_INDEPENDENT ? 1 : 0;
1139+ return qApp->getCamera().getMode() == CAMERA_MODE_INDEPENDENT ? 1 : 0;
11401140 });
11411141 _applicationStateDevice->setInputVariant(STATE_SNAP_TURN, []() -> float {
11421142 return qApp->getMyAvatar()->getSnapTurn() ? 1 : 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t