Showing the changes to interface/src/main.cpp (1 of 14 files). Show all
Unified · Split
| @@ -78,6 +78,7 @@ · 77 unmodified lines | |||
| 78 | 78 | ||
| 79 | #include "ViewFrustum.h" | 79 | #include "ViewFrustum.h" |
| 80 | #include "HandControl.h" | 80 | #include "HandControl.h" |
| 81 | #include "AvatarRenderer.h" | ||
| 81 | 82 | ||
| 82 | using namespace std; | 83 | using namespace std; |
| 83 | 84 | ||
| @@ -115,6 +116,8 @@ Avatar myAvatar(true); // The rendered avatar of oneself · 31 unmodified lines | |||
| 115 | Camera myCamera; // My view onto the world (sometimes on myself :) | 116 | Camera myCamera; // My view onto the world (sometimes on myself :) |
| 116 | Camera viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode | 117 | Camera viewFrustumOffsetCamera; // The camera we use to sometimes show the view frustum from an offset mode |
| 117 | 118 | ||
| 119 | AvatarRenderer avatarRenderer; | ||
| 120 | |||
| 118 | // Starfield information | 121 | // Starfield information |
| 119 | char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt"; | 122 | char starFile[] = "https://s3-us-west-1.amazonaws.com/highfidelity/stars.txt"; |
| 120 | char starCacheFile[] = "cachedStars.txt"; | 123 | char starCacheFile[] = "cachedStars.txt"; |
| @@ -1710,6 +1713,7 @@ void idle(void) { · 1589 unmodified lines | |||
| 1710 | handControl.stop(); | 1713 | handControl.stop(); |
| 1711 | } | 1714 | } |
| 1712 | 1715 | ||
| 1716 | // Read serial port interface devices | ||
| 1713 | if (serialPort.active && USING_INVENSENSE_MPU9150) { | 1717 | if (serialPort.active && USING_INVENSENSE_MPU9150) { |
| 1714 | serialPort.readData(); | 1718 | serialPort.readData(); |
| 1715 | } | 1719 | } |
| @@ -1735,7 +1739,11 @@ void idle(void) { · 19 unmodified lines | |||
| 1735 | 1739 | ||
| 1736 | myAvatar.setGravity(getGravity(myAvatar.getPosition())); | 1740 | myAvatar.setGravity(getGravity(myAvatar.getPosition())); |
| 1737 | myAvatar.simulate(deltaTime); | 1741 | myAvatar.simulate(deltaTime); |
| 1738 | 1742 | ||
| 1743 | // Update audio stats for procedural sounds | ||
| 1744 | audio.setLastAcceleration(myAvatar.getThrust()); | ||
| 1745 | audio.setLastVelocity(myAvatar.getVelocity()); | ||
| 1746 | |||
| 1739 | glutPostRedisplay(); | 1747 | glutPostRedisplay(); |
| 1740 | lastTimeIdle = check; | 1748 | lastTimeIdle = check; |
| 1741 | } | 1749 | } |