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
1799 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager1799 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager
1800 _avatarManager.init();1800 _avatarManager.init();
1801 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);1801 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
1802 _myCamera.setModeShiftRate(1.0f);1802 _myCamera.setModeShiftPeriod(1.0f);
1803 1803
1804 _mirrorCamera.setMode(CAMERA_MODE_MIRROR);1804 _mirrorCamera.setMode(CAMERA_MODE_MIRROR);
1805 _mirrorCamera.setAspectRatio((float)MIRROR_VIEW_WIDTH / (float)MIRROR_VIEW_HEIGHT);1805 _mirrorCamera.setAspectRatio((float)MIRROR_VIEW_WIDTH / (float)MIRROR_VIEW_HEIGHT);
@@ -2168,17 +2168,17 @@ void Application::cameraMenuChanged() { · 362 unmodified lines
2168 if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) {2168 if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) {
2169 if (_myCamera.getMode() != CAMERA_MODE_MIRROR) {2169 if (_myCamera.getMode() != CAMERA_MODE_MIRROR) {
2170 _myCamera.setMode(CAMERA_MODE_MIRROR);2170 _myCamera.setMode(CAMERA_MODE_MIRROR);
2171 _myCamera.setModeShiftRate(100.0f);2171 _myCamera.setModeShiftPeriod(0.00f);
2172 }2172 }
2173 } else if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) {2173 } else if (Menu::getInstance()->isOptionChecked(MenuOption::FirstPerson)) {
2174 if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {2174 if (_myCamera.getMode() != CAMERA_MODE_FIRST_PERSON) {
2175 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);2175 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
2176 _myCamera.setModeShiftRate(1.0f);2176 _myCamera.setModeShiftPeriod(1.0f);
2177 }2177 }
2178 } else {2178 } else {
2179 if (_myCamera.getMode() != CAMERA_MODE_THIRD_PERSON) {2179 if (_myCamera.getMode() != CAMERA_MODE_THIRD_PERSON) {
2180 _myCamera.setMode(CAMERA_MODE_THIRD_PERSON);2180 _myCamera.setMode(CAMERA_MODE_THIRD_PERSON);
2181 _myCamera.setModeShiftRate(1.0f);2181 _myCamera.setModeShiftPeriod(1.0f);
2182 }2182 }
2183 }2183 }
2184}2184}

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