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() {
PerformanceTimer perfTimer("faceshift");
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
PerformanceWarning warn(showWarnings, "Application::updateFaceshift()");
@ -1868,8 +1866,6 @@ void Application::updateFaceshift() {
}
void Application::updateVisage() {
PerformanceTimer perfTimer("visage");
bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
PerformanceWarning warn(showWarnings, "Application::updateVisage()");
@ -2055,18 +2051,17 @@ void Application::update(float deltaTime) {
updateLOD();
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");
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
}

View file

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

View file

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

View file

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

View file

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

View file

@ -11,6 +11,7 @@
#include <QHash>
#include <PerfStat.h>
#include <SharedUtil.h>
#include <FBXReader.h>
@ -128,6 +129,7 @@ void Visage::update() {
if (!_active) {
return;
}
PerformanceTimer perfTimer("visage");
_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]) -
_headOrigin) * TRANSLATION_SCALE;