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
126126 _mouseVoxelScale(1.0f / 1024.0f),
127127 _mouseVoxelScaleInitialized(false),
128128 _justEditedVoxel(false),
129+ _isHighlightVoxel(false),
129130 _nudgeStarted(false),
130131 _lookingAlongX(false),
131132 _lookingAwayFromOrigin(true),
@@ -1765,8 +1766,6 @@ void Application::init() { · 1633 unmodified lines
17651766 _voxelShader.init();
17661767 _pointShader.init();
17671768
1768− _handControl.setScreenDimensions(_glWidget->width(), _glWidget->height());
1769−
17701769 _headMouseX = _mouseX = _glWidget->width() / 2;
17711770 _headMouseY = _mouseY = _glWidget->height() / 2;
17721771 QCursor::setPos(_headMouseX, _headMouseY);
@@ -1991,6 +1990,24 @@ void Application::renderFollowIndicator() { · 218 unmodified lines
19911990 }
19921991 }
19931992
1993+void 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+
19942011 void Application::updateAvatars(float deltaTime, glm::vec3 mouseRayOrigin, glm::vec3 mouseRayDirection) {
19952012 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
19962013 PerformanceWarning warn(showWarnings, "Application::updateAvatars()");
@@ -2236,11 +2253,6 @@ void Application::updateHandAndTouch(float deltaTime) { · 239 unmodified lines
22362253 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
22372254 PerformanceWarning warn(showWarnings, "Application::updateHandAndTouch()");
22382255
2239− // walking triggers the handControl to stop
2240− if (_myAvatar.getMode() == AVATAR_MODE_WALKING) {
2241− _handControl.stop();
2242− }
2243−
22442256 // Update from Touch
22452257 if (_isTouchPressed) {
22462258 float TOUCH_YAW_SCALE = -0.25f;
@@ -3025,6 +3037,11 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 778 unmodified lines
30253037 // restore default, white specular
30263038 glMaterialfv(GL_FRONT, GL_SPECULAR, WHITE_SPECULAR_COLOR);
30273039
3040+ // Render the highlighted voxel
3041+ if (_isHighlightVoxel) {
3042+ renderHighlightVoxel(_highlightVoxel);
3043+ }
3044+
30283045 // indicate what we'll be adding/removing in mouse mode, if anything
30293046 if (_mouseVoxel.s != 0 && whichCamera.getMode() != CAMERA_MODE_MIRROR) {
30303047 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
@@ -3048,7 +3065,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 17 unmodified lines
30483065 } else {
30493066 renderMouseVoxelGrid(_mouseVoxel.x, _mouseVoxel.y, _mouseVoxel.z, _mouseVoxel.s);
30503067 }
3051−
3068+
30523069 if (Menu::getInstance()->isOptionChecked(MenuOption::VoxelAddMode)) {
30533070 // use a contrasting color so that we can see what we're doing
30543071 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