Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all
Unified · Split
| @@ -551,6 +551,7 @@ void Application::sendVoxelServerAddScene() { · 550 unmodified lines | ||
| 551 | 551 | } |
| 552 | 552 | |
| 553 | 553 | void Application::keyPressEvent(QKeyEvent* event) { |
| 554 | + | |
| 554 | 555 | if (activeWindow() == _window) { |
| 555 | 556 | if (_chatEntryOn) { |
| 556 | 557 | if (_chatEntry.keyPressEvent(event)) { |
| @@ -566,6 +567,11 @@ void Application::keyPressEvent(QKeyEvent* event) { · 9 unmodified lines | ||
| 566 | 567 | } |
| 567 | 568 | return; |
| 568 | 569 | } |
| 570 | + | |
| 571 | + //this is for switching between modes for the leap rave glove test | |
| 572 | + if (_simulateLeapHand->isChecked() || _testRaveGlove->isChecked()) { | |
| 573 | + _myAvatar.getHand().setRaveGloveEffectsMode((QKeyEvent*)event); | |
| 574 | + } | |
| 569 | 575 | |
| 570 | 576 | bool shifted = event->modifiers().testFlag(Qt::ShiftModifier); |
| 571 | 577 | switch (event->key()) { |
| @@ -765,7 +771,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 193 unmodified lines | ||
| 765 | 771 | case Qt::Key_6: |
| 766 | 772 | case Qt::Key_7: |
| 767 | 773 | case Qt::Key_8: |
| 768 | − _swatch.handleEvent(event->key(), _eyedropperMode->isChecked()); | |
| 774 | + _swatch.handleEvent(event->key(), _eyedropperMode->isChecked()); | |
| 769 | 775 | break; |
| 770 | 776 | default: |
| 771 | 777 | event->ignore(); |
| @@ -776,6 +782,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 4 unmodified lines | ||
| 776 | 782 | |
| 777 | 783 | void Application::keyReleaseEvent(QKeyEvent* event) { |
| 778 | 784 | if (activeWindow() == _window) { |
| 785 | + | |
| 779 | 786 | if (_chatEntryOn) { |
| 780 | 787 | _myAvatar.setKeyState(NO_KEY_DOWN); |
| 781 | 788 | return; |
| @@ -2652,9 +2659,17 @@ void Application::displaySide(Camera& whichCamera) { · 1870 unmodified lines | ||
| 2652 | 2659 | float sphereRadius = 0.25f; |
| 2653 | 2660 | glColor3f(1,0,0); |
| 2654 | 2661 | glPushMatrix(); |
| 2655 | − glutSolidSphere(sphereRadius, 15, 15); | |
| 2662 | + glutSolidSphere(sphereRadius, 15, 15); | |
| 2656 | 2663 | glPopMatrix(); |
| 2657 | 2664 | |
| 2665 | +/* | |
| 2666 | +glPushMatrix(); | |
| 2667 | +glColor3f(1, 0, 1); | |
| 2668 | +glTranslatef(0.0f, 0.0f, 5.0f); | |
| 2669 | +_particleSystem.render(); | |
| 2670 | +glPopMatrix(); | |
| 2671 | +*/ | |
| 2672 | + | |
| 2658 | 2673 | //draw a grid ground plane.... |
| 2659 | 2674 | if (_renderGroundPlaneOn->isChecked()) { |
| 2660 | 2675 | renderGroundPlaneGrid(EDGE_SIZE_GROUND_PLANE, _audio.getCollisionSoundMagnitude()); |
| @@ -2715,13 +2730,25 @@ void Application::displaySide(Camera& whichCamera) { · 54 unmodified lines | ||
| 2715 | 2730 | renderLookatIndicator(_lookatOtherPosition, whichCamera); |
| 2716 | 2731 | } |
| 2717 | 2732 | } |
| 2718 | − | |
| 2733 | + | |
| 2719 | 2734 | if (TESTING_PARTICLE_SYSTEM) { |
| 2720 | 2735 | if (_particleSystemInitialized) { |
| 2721 | − _particleSystem.render(); | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | +/* | |
| 2740 | +glPushMatrix(); | |
| 2741 | +glColor3f(1, 0, 1); | |
| 2742 | +glTranslatef(0.0f, 0.0f, 5.0f); | |
| 2743 | +_particleSystem.render(); | |
| 2744 | +glPopMatrix(); | |
| 2745 | +*/ | |
| 2746 | + | |
| 2747 | +_particleSystem.render(); | |
| 2722 | 2748 | } |
| 2723 | 2749 | } |
| 2724 | − | |
| 2750 | + | |
| 2751 | + | |
| 2725 | 2752 | // Render the world box |
| 2726 | 2753 | if (!_lookingInMirror->isChecked() && _renderStatsOn->isChecked()) { render_world_box(); } |
| 2727 | 2754 | |
| @@ -3658,8 +3685,9 @@ void Application::updateParticleSystem(float deltaTime) { · 930 unmodified lines | ||
| 3658 | 3685 | const float EMIT_RATE_IN_SECONDS = 10000.0; |
| 3659 | 3686 | // create a stable test emitter and spit out a bunch of particles |
| 3660 | 3687 | _coolDemoParticleEmitter = _particleSystem.addEmitter(); |
| 3661 | − | |
| 3688 | + | |
| 3662 | 3689 | if (_coolDemoParticleEmitter != -1) { |
| 3690 | + | |
| 3663 | 3691 | _particleSystem.setShowingEmitter(_coolDemoParticleEmitter, true); |
| 3664 | 3692 | glm::vec3 particleEmitterPosition = glm::vec3(5.0f, 1.0f, 5.0f); |
| 3665 | 3693 | |
| @@ -3673,7 +3701,7 @@ void Application::updateParticleSystem(float deltaTime) { · 7 unmodified lines | ||
| 3673 | 3701 | _particleSystemInitialized = true; |
| 3674 | 3702 | } else { |
| 3675 | 3703 | // update the particle system |
| 3676 | − | |
| 3704 | + | |
| 3677 | 3705 | static bool emitting = true; |
| 3678 | 3706 | static float t = 0.0f; |
| 3679 | 3707 | t += deltaTime; |