Showing the changes to interface/src/Application.cpp (1 of 23 files). Show all
Unified · Split
| @@ -1394,13 +1394,13 @@ void Application::increaseVoxelSize() { · 1393 unmodified lines | |||
| 1394 | 1394 | ||
| 1395 | const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500; | 1395 | const int MAXIMUM_EDIT_VOXEL_MESSAGE_SIZE = 1500; |
| 1396 | struct SendVoxelsOperationArgs { | 1396 | struct SendVoxelsOperationArgs { |
| 1397 | unsigned char* newBaseOctCode; | 1397 | const unsigned char* newBaseOctCode; |
| 1398 | }; | 1398 | }; |
| 1399 | 1399 | ||
| 1400 | bool Application::sendVoxelsOperation(VoxelNode* node, void* extraData) { | 1400 | bool Application::sendVoxelsOperation(VoxelNode* node, void* extraData) { |
| 1401 | SendVoxelsOperationArgs* args = (SendVoxelsOperationArgs*)extraData; | 1401 | SendVoxelsOperationArgs* args = (SendVoxelsOperationArgs*)extraData; |
| 1402 | if (node->isColored()) { | 1402 | if (node->isColored()) { |
| 1403 | unsigned char* nodeOctalCode = node->getOctalCode(); | 1403 | const unsigned char* nodeOctalCode = node->getOctalCode(); |
| 1404 | 1404 | ||
| 1405 | unsigned char* codeColorBuffer = NULL; | 1405 | unsigned char* codeColorBuffer = NULL; |
| 1406 | int codeLength = 0; | 1406 | int codeLength = 0; |
| @@ -2784,24 +2784,40 @@ void Application::displayOverlay() { · 1377 unmodified lines | |||
| 2784 | if (Menu::getInstance()->isOptionChecked(MenuOption::HeadMouse) | 2784 | if (Menu::getInstance()->isOptionChecked(MenuOption::HeadMouse) |
| 2785 | && !Menu::getInstance()->isOptionChecked(MenuOption::Mirror) | 2785 | && !Menu::getInstance()->isOptionChecked(MenuOption::Mirror) |
| 2786 | && USING_INVENSENSE_MPU9150) { | 2786 | && USING_INVENSENSE_MPU9150) { |
| 2787 | // Display small target box at center or head mouse target that can also be used to measure LOD | 2787 | // Display small target box at center or head mouse target that can also be used to measure LOD |
| 2788 | glColor3f(1.0, 1.0, 1.0); | 2788 | glColor3f(1.0, 1.0, 1.0); |
| 2789 | glDisable(GL_LINE_SMOOTH); | ||
| 2790 | const int PIXEL_BOX = 16; | ||
| 2791 | glBegin(GL_LINES); | ||
| 2792 | glVertex2f(_headMouseX - PIXEL_BOX/2, _headMouseY); | ||
| 2793 | glVertex2f(_headMouseX + PIXEL_BOX/2, _headMouseY); | ||
| 2794 | glVertex2f(_headMouseX, _headMouseY - PIXEL_BOX/2); | ||
| 2795 | glVertex2f(_headMouseX, _headMouseY + PIXEL_BOX/2); | ||
| 2796 | glEnd(); | ||
| 2797 | glEnable(GL_LINE_SMOOTH); | ||
| 2798 | glColor3f(1.f, 0.f, 0.f); | ||
| 2799 | glPointSize(3.0f); | ||
| 2800 | glDisable(GL_POINT_SMOOTH); | ||
| 2801 | glBegin(GL_POINTS); | ||
| 2802 | glVertex2f(_headMouseX - 1, _headMouseY + 1); | ||
| 2803 | glEnd(); | ||
| 2804 | // If Faceshift is active, show eye pitch and yaw as separate pointer | ||
| 2805 | if (_faceshift.isActive()) { | ||
| 2806 | const float EYE_TARGET_PIXELS_PER_DEGREE = 40.0; | ||
| 2807 | int eyeTargetX = (_glWidget->width() / 2) - _faceshift.getEstimatedEyeYaw() * EYE_TARGET_PIXELS_PER_DEGREE; | ||
| 2808 | int eyeTargetY = (_glWidget->height() / 2) - _faceshift.getEstimatedEyePitch() * EYE_TARGET_PIXELS_PER_DEGREE; | ||
| 2809 | |||
| 2810 | glColor3f(0.0, 1.0, 1.0); | ||
| 2789 | glDisable(GL_LINE_SMOOTH); | 2811 | glDisable(GL_LINE_SMOOTH); |
| 2790 | const int PIXEL_BOX = 16; | ||
| 2791 | glBegin(GL_LINES); | 2812 | glBegin(GL_LINES); |
| 2792 | glVertex2f(_headMouseX - PIXEL_BOX/2, _headMouseY); | 2813 | glVertex2f(eyeTargetX - PIXEL_BOX/2, eyeTargetY); |
| 2793 | glVertex2f(_headMouseX + PIXEL_BOX/2, _headMouseY); | 2814 | glVertex2f(eyeTargetX + PIXEL_BOX/2, eyeTargetY); |
| 2794 | glVertex2f(_headMouseX, _headMouseY - PIXEL_BOX/2); | 2815 | glVertex2f(eyeTargetX, eyeTargetY - PIXEL_BOX/2); |
| 2795 | glVertex2f(_headMouseX, _headMouseY + PIXEL_BOX/2); | 2816 | glVertex2f(eyeTargetX, eyeTargetY + PIXEL_BOX/2); |
| 2796 | glEnd(); | ||
| 2797 | glEnable(GL_LINE_SMOOTH); | ||
| 2798 | glColor3f(1.f, 0.f, 0.f); | ||
| 2799 | glPointSize(3.0f); | ||
| 2800 | glDisable(GL_POINT_SMOOTH); | ||
| 2801 | glBegin(GL_POINTS); | ||
| 2802 | glVertex2f(_headMouseX - 1, _headMouseY + 1); | ||
| 2803 | glEnd(); | 2817 | glEnd(); |
| 2818 | |||
| 2804 | } | 2819 | } |
| 2820 | } | ||
| 2805 | 2821 | ||
| 2806 | // Show detected levels from the serial I/O ADC channel sensors | 2822 | // Show detected levels from the serial I/O ADC channel sensors |
| 2807 | if (_displayLevels) _serialHeadSensor.renderLevels(_glWidget->width(), _glWidget->height()); | 2823 | if (_displayLevels) _serialHeadSensor.renderLevels(_glWidget->width(), _glWidget->height()); |