History

Merge branch 'master' of https://github.com/highfidelity/hifi into protocol

Stephen Birarda committed 11 years ago

Commit 25aeda22 parents b2778bf 670c5ee30 files · +1684 −102Browse files

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

Unified · Split

interface/src/Application.cpp+13−7
@@ -622,6 +622,15 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 621 unmodified lines
622 // Setup the userInputMapper with the actions622 // Setup the userInputMapper with the actions
623 auto userInputMapper = DependencyManager::get<UserInputMapper>();623 auto userInputMapper = DependencyManager::get<UserInputMapper>();
624 connect(userInputMapper.data(), &UserInputMapper::actionEvent, &_controllerScriptingInterface, &AbstractControllerScriptingInterface::actionEvent);624 connect(userInputMapper.data(), &UserInputMapper::actionEvent, &_controllerScriptingInterface, &AbstractControllerScriptingInterface::actionEvent);
625 connect(userInputMapper.data(), &UserInputMapper::actionEvent, [this](int action, float state) {
626 if (state) {
627 switch (action) {
628 case UserInputMapper::Action::TOGGLE_MUTE:
629 DependencyManager::get<AudioClient>()->toggleMute();
630 break;
631 }
632 }
633 });
625 634
626 // Setup the keyboardMouseDevice and the user input mapper with the default bindings635 // Setup the keyboardMouseDevice and the user input mapper with the default bindings
627 _keyboardMouseDevice->registerToUserInputMapper(*userInputMapper);636 _keyboardMouseDevice->registerToUserInputMapper(*userInputMapper);
@@ -3070,9 +3079,8 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 2442 unmodified lines
3070 voxelDetailsForCode(rootCode, rootDetails);3079 voxelDetailsForCode(rootCode, rootDetails);
3071 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,3080 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,
3072 rootDetails.y * TREE_SCALE,3081 rootDetails.y * TREE_SCALE,
3073 rootDetails.z * TREE_SCALE),3082 rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
3074 rootDetails.s * TREE_SCALE);3083 rootDetails.s * TREE_SCALE);
3075
3076 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);3084 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);
3077 3085
3078 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {3086 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
@@ -3137,11 +3145,10 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 58 unmodified lines
3137 voxelDetailsForCode(rootCode, rootDetails);3145 voxelDetailsForCode(rootCode, rootDetails);
3138 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,3146 AACube serverBounds(glm::vec3(rootDetails.x * TREE_SCALE,
3139 rootDetails.y * TREE_SCALE,3147 rootDetails.y * TREE_SCALE,
3140 rootDetails.z * TREE_SCALE),3148 rootDetails.z * TREE_SCALE) - glm::vec3(HALF_TREE_SCALE),
3141 rootDetails.s * TREE_SCALE);3149 rootDetails.s * TREE_SCALE);
3142 3150
3143 3151
3144
3145 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);3152 ViewFrustum::location serverFrustumLocation = _viewFrustum.cubeInFrustum(serverBounds);
3146 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {3153 if (serverFrustumLocation != ViewFrustum::OUTSIDE) {
3147 inView = true;3154 inView = true;
@@ -3160,7 +3167,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 12 unmodified lines
3160 } else if (unknownView) {3167 } else if (unknownView) {
3161 if (wantExtraDebugging) {3168 if (wantExtraDebugging) {
3162 qCDebug(interfaceapp) << "no known jurisdiction for node " << *node << ", give it budget of "3169 qCDebug(interfaceapp) << "no known jurisdiction for node " << *node << ", give it budget of "
3163 << perUnknownServer << " to send us jurisdiction.";3170 << perUnknownServer << " to send us jurisdiction.";
3164 }3171 }
3165 3172
3166 // set the query's position/orientation to be degenerate in a manner that will get the scene quickly3173 // set the query's position/orientation to be degenerate in a manner that will get the scene quickly
@@ -5101,11 +5108,10 @@ void Application::emulateMouse(Hand* hand, float click, float shift, int index) · 1934 unmodified lines
5101}5108}
5102 5109
5103void Application::crashApplication() {5110void Application::crashApplication() {
5111 qCDebug(interfaceapp) << "Intentionally crashed Interface";
5104 QObject* object = nullptr;5112 QObject* object = nullptr;
5105 bool value = object->isWindowType();5113 bool value = object->isWindowType();
5106 Q_UNUSED(value);5114 Q_UNUSED(value);
5107
5108 qCDebug(interfaceapp) << "Intentionally crashed Interface";
5109}5115}
5110 5116
5111void Application::setActiveDisplayPlugin(const QString& pluginName) {5117void Application::setActiveDisplayPlugin(const QString& pluginName) {