History

Removed obsolete HandControl class, files

Philip Rosedale committed 12 years ago

Commit a84e97c1 parent 44f92fb8 files · +114 −155Browse files

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

Unified · Split

interface/src/Application.cpp+25−8
@@ -126,6 +126,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) : · 125 unmodified lines
126 _mouseVoxelScale(1.0f / 1024.0f),126 _mouseVoxelScale(1.0f / 1024.0f),
127 _mouseVoxelScaleInitialized(false),127 _mouseVoxelScaleInitialized(false),
128 _justEditedVoxel(false),128 _justEditedVoxel(false),
129 _isHighlightVoxel(false),
129 _nudgeStarted(false),130 _nudgeStarted(false),
130 _lookingAlongX(false),131 _lookingAlongX(false),
131 _lookingAwayFromOrigin(true),132 _lookingAwayFromOrigin(true),
@@ -1765,8 +1766,6 @@ void Application::init() { · 1633 unmodified lines
1765 _voxelShader.init();1766 _voxelShader.init();
1766 _pointShader.init();1767 _pointShader.init();
1767 1768
1768 _handControl.setScreenDimensions(_glWidget->width(), _glWidget->height());
1769
1770 _headMouseX = _mouseX = _glWidget->width() / 2;1769 _headMouseX = _mouseX = _glWidget->width() / 2;
1771 _headMouseY = _mouseY = _glWidget->height() / 2;1770 _headMouseY = _mouseY = _glWidget->height() / 2;
1772 QCursor::setPos(_headMouseX, _headMouseY);1771 QCursor::setPos(_headMouseX, _headMouseY);
@@ -1991,6 +1990,24 @@ void Application::renderFollowIndicator() { · 218 unmodified lines
1991 }1990 }
1992}1991}
1993 1992
1993void Application::renderHighlightVoxel(VoxelDetail voxel) {
1994 glDisable(GL_LIGHTING);
1995 glPushMatrix();
1996 glScalef(TREE_SCALE, TREE_SCALE, TREE_SCALE);
1997 //printf("Render: %.6f,%.6f,%.6f %.8f\n", voxel.x, voxel.y, voxel.z,
1998 // voxel.s);
1999 const float EDGE_EXPAND = 1.01f;
2000 //glColor3ub(voxel.red + 128, voxel.green + 128, voxel.blue + 128);
2001 glColor3ub(255, 0, 0);
2002
2003 glTranslatef(voxel.x + voxel.s * 0.5f,
2004 voxel.y + voxel.s * 0.5f,
2005 voxel.z + voxel.s * 0.5f);
2006 glLineWidth(4.0f);
2007 glutWireCube(_mouseVoxel.s * EDGE_EXPAND);
2008 glPopMatrix();
2009}
2010
1994void Application::updateAvatars(float deltaTime, glm::vec3 mouseRayOrigin, glm::vec3 mouseRayDirection) {2011void Application::updateAvatars(float deltaTime, glm::vec3 mouseRayOrigin, glm::vec3 mouseRayDirection) {
1995 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);2012 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
1996 PerformanceWarning warn(showWarnings, "Application::updateAvatars()");2013 PerformanceWarning warn(showWarnings, "Application::updateAvatars()");
@@ -2236,11 +2253,6 @@ void Application::updateHandAndTouch(float deltaTime) { · 239 unmodified lines
2236 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);2253 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
2237 PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");2254 PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
2238 2255
2239 // walking triggers the handControl to stop
2240 if (_myAvatar.getMode() == AVATAR_MODE_WALKING) {
2241 _handControl.stop();
2242 }
2243
2244 // Update from Touch2256 // Update from Touch
2245 if (_isTouchPressed) {2257 if (_isTouchPressed) {
2246 float TOUCH_YAW_SCALE = -0.25f;2258 float TOUCH_YAW_SCALE = -0.25f;
@@ -3025,6 +3037,11 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 778 unmodified lines
3025 // restore default, white specular3037 // restore default, white specular
3026 glMaterialfv(GL_FRONT, GL_SPECULAR, WHITE_SPECULAR_COLOR);3038 glMaterialfv(GL_FRONT, GL_SPECULAR, WHITE_SPECULAR_COLOR);
3027 3039
3040 // Render the highlighted voxel
3041 if (_isHighlightVoxel) {
3042 renderHighlightVoxel(_highlightVoxel);
3043 }
3044
3028 // indicate what we'll be adding/removing in mouse mode, if anything3045 // indicate what we'll be adding/removing in mouse mode, if anything
3029 if (_mouseVoxel.s != 0 && whichCamera.getMode() != CAMERA_MODE_MIRROR) {3046 if (_mouseVoxel.s != 0 && whichCamera.getMode() != CAMERA_MODE_MIRROR) {
3030 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), 3047 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
@@ -3048,7 +3065,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 17 unmodified lines
3048 } else {3065 } else {
3049 renderMouseVoxelGrid(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s);3066 renderMouseVoxelGrid(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s);
3050 }3067 }
3051 3068
3052 if (Menu::getInstance()->isOptionChecked(MenuOption::VoxelAddMode)) {3069 if (Menu::getInstance()->isOptionChecked(MenuOption::VoxelAddMode)) {
3053 // use a contrasting color so that we can see what we're doing3070 // use a contrasting color so that we can see what we're doing
3054 glColor3ub(_mouseVoxel.red + 128, _mouseVoxel.green + 128, _mouseVoxel.blue + 128);3071 glColor3ub(_mouseVoxel.red + 128, _mouseVoxel.green + 128, _mouseVoxel.blue + 128);

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