History

Simplifiy API for camera mode transitions

Specify the "period" for the transition rather than the "rate".

Andrew Meadows committed 12 years ago

Commit 6ce028b1 parent 91740f83 files · +19 −23Browse files

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

Unified · Split

interface/src/Application.cpp+4−4
@@ -1799,7 +1799,7 @@ void Application::init() { · 1798 unmodified lines
17991799 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager
18001800 _avatarManager.init();
18011801 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
1802− _myCamera.setModeShiftRate(1.0f);
1802+ _myCamera.setModeShiftPeriod(1.0f);
18031803
18041804 _mirrorCamera.setMode(CAMERA_MODE_MIRROR);
18051805 _mirrorCamera.setAspectRatio((float)MIRROR_VIEW_WIDTH / (float)MIRROR_VIEW_HEIGHT);
@@ -2168,17 +2168,17 @@ void Application::cameraMenuChanged() { · 362 unmodified lines
21682168 if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) {
21692169 if (_myCamera.getMode() != CAMERA_MODE_MIRROR) {
21702170 _myCamera.setMode(CAMERA_MODE_MIRROR);
2171− _myCamera.setModeShiftRate(100.0f);
2171+ _myCamera.setModeShiftPeriod(0.00f);
21722172 }
21732173 } else if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) {
21742174 if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {
21752175 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
2176− _myCamera.setModeShiftRate(1.0f);
2176+ _myCamera.setModeShiftPeriod(1.0f);
21772177 }
21782178 } else {
21792179 if (_myCamera.getMode() != CAMERA_MODE_THIRD_PERSON) {
21802180 _myCamera.setMode(CAMERA_MODE_THIRD_PERSON);
2181− _myCamera.setModeShiftRate(1.0f);
2181+ _myCamera.setModeShiftPeriod(1.0f);
21822182 }
21832183 }
21842184 }

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