modified scope of devices stats

This commit is contained in:
Andrew Meadows 2014-07-09 13:58:54 -07:00
parent 3d6752ad90
commit 6ffa09f9e6
6 changed files with 23 additions and 15 deletions

View file

@ -1853,8 +1853,6 @@ void Application::updateMouseRay() {
} }
void Application::updateFaceshift() { void Application::updateFaceshift() {
PerformanceTimer perfTimer("faceshift");
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
PerformanceWarning warn(showWarnings, "Application::updateFaceshift()"); PerformanceWarning warn(showWarnings, "Application::updateFaceshift()");
@ -1868,8 +1866,6 @@ void Application::updateFaceshift() {
} }
void Application::updateVisage() { void Application::updateVisage() {
PerformanceTimer perfTimer("visage");
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
PerformanceWarning warn(showWarnings, "Application::updateVisage()"); PerformanceWarning warn(showWarnings, "Application::updateVisage()");
@ -2055,18 +2051,17 @@ void Application::update(float deltaTime) {
updateLOD(); updateLOD();
updateMouseRay(); // check what's under the mouse and update the mouse voxel updateMouseRay(); // check what's under the mouse and update the mouse voxel
updateFaceshift(); {
updateVisage(); PerformanceTimer perfTimer("devices");
updateFaceshift();
updateVisage();
_sixenseManager.update(deltaTime);
_joystickManager.update();
_prioVR.update(deltaTime);
}
{ {
PerformanceTimer perfTimer("myAvatar"); PerformanceTimer perfTimer("myAvatar");
updateMyAvatarLookAtPosition(); updateMyAvatarLookAtPosition();
{
PerformanceTimer perfTimer("devices");
_sixenseManager.update(deltaTime);
_joystickManager.update();
_prioVR.update(deltaTime);
}
updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes
} }

View file

@ -11,6 +11,7 @@
#include <QTimer> #include <QTimer>
#include <PerfStat.h>
#include <SharedUtil.h> #include <SharedUtil.h>
#include "Application.h" #include "Application.h"
@ -75,6 +76,7 @@ void Faceshift::update() {
if (!isActive()) { if (!isActive()) {
return; return;
} }
PerformanceTimer perfTimer("faceshift");
// get the euler angles relative to the window // get the euler angles relative to the window
glm::vec3 eulers = glm::degrees(safeEulerAngles(_headRotation * glm::quat(glm::radians(glm::vec3( glm::vec3 eulers = glm::degrees(safeEulerAngles(_headRotation * glm::quat(glm::radians(glm::vec3(
(_eyeGazeLeftPitch + _eyeGazeRightPitch) / 2.0f, (_eyeGazeLeftYaw + _eyeGazeRightYaw) / 2.0f, 0.0f))))); (_eyeGazeLeftPitch + _eyeGazeRightPitch) / 2.0f, (_eyeGazeLeftYaw + _eyeGazeRightYaw) / 2.0f, 0.0f)))));

View file

@ -12,9 +12,10 @@
#include <limits> #include <limits>
#include <QtDebug> #include <QtDebug>
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <PerfStat.h>
#include "JoystickManager.h" #include "JoystickManager.h"
using namespace std; using namespace std;
@ -46,6 +47,7 @@ JoystickManager::~JoystickManager() {
void JoystickManager::update() { void JoystickManager::update() {
#ifdef HAVE_SDL #ifdef HAVE_SDL
PerformanceTimer perfTimer("joystick");
SDL_JoystickUpdate(); SDL_JoystickUpdate();
for (int i = 0; i < _joystickStates.size(); i++) { for (int i = 0; i < _joystickStates.size(); i++) {

View file

@ -13,6 +13,7 @@
#include <QtDebug> #include <QtDebug>
#include <FBXReader.h> #include <FBXReader.h>
#include <PerfStat.h>
#include "Application.h" #include "Application.h"
#include "PrioVR.h" #include "PrioVR.h"
@ -166,6 +167,7 @@ void PrioVR::update(float deltaTime) {
if (!_skeletalDevice) { if (!_skeletalDevice) {
return; return;
} }
PerformanceTimer perfTimer("PrioVR");
unsigned int timestamp; unsigned int timestamp;
yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(), yei_getLastStreamDataAll(_skeletalDevice, (char*)_jointRotations.data(),
_jointRotations.size() * sizeof(glm::quat), &timestamp); _jointRotations.size() * sizeof(glm::quat), &timestamp);

View file

@ -11,6 +11,8 @@
#include <vector> #include <vector>
#include <PerfStat.h>
#include "Application.h" #include "Application.h"
#include "SixenseManager.h" #include "SixenseManager.h"
#include "UserActivityLogger.h" #include "UserActivityLogger.h"
@ -83,7 +85,10 @@ void SixenseManager::update(float deltaTime) {
if (sixenseGetNumActiveControllers() == 0) { if (sixenseGetNumActiveControllers() == 0) {
_hydrasConnected = false; _hydrasConnected = false;
return; return;
} else if (!_hydrasConnected) { }
PerformanceTimer perfTimer("sixense");
if (!_hydrasConnected) {
_hydrasConnected = true; _hydrasConnected = true;
UserActivityLogger::getInstance().connectedDevice("spatial_controller", "hydra"); UserActivityLogger::getInstance().connectedDevice("spatial_controller", "hydra");
} }

View file

@ -11,6 +11,7 @@
#include <QHash> #include <QHash>
#include <PerfStat.h>
#include <SharedUtil.h> #include <SharedUtil.h>
#include <FBXReader.h> #include <FBXReader.h>
@ -128,6 +129,7 @@ void Visage::update() {
if (!_active) { if (!_active) {
return; return;
} }
PerformanceTimer perfTimer("visage");
_headRotation = glm::quat(glm::vec3(-_data->faceRotation[0], -_data->faceRotation[1], _data->faceRotation[2])); _headRotation = glm::quat(glm::vec3(-_data->faceRotation[0], -_data->faceRotation[1], _data->faceRotation[2]));
_headTranslation = (glm::vec3(_data->faceTranslation[0], _data->faceTranslation[1], _data->faceTranslation[2]) - _headTranslation = (glm::vec3(_data->faceTranslation[0], _data->faceTranslation[1], _data->faceTranslation[2]) -
_headOrigin) * TRANSLATION_SCALE; _headOrigin) * TRANSLATION_SCALE;