overte-HifiExperiments/libraries/shared/src/DebugDraw.cpp
Anthony J. Thibault 641e152699 Eye tracking bug fix and debug rendering improvement
* Bug fix for eye tracking in HMD, the "up" orientation of your eyes now match your head.
* DebugDraw: added drawRay method.
* Application: Renamed preRender to postUpdate
* AvatarManager: added postUpdate method that iterates over all avatars.
* MyAvatar: Renamed preRender to preDisplaySide
* MyAvatar: split preRender code into postUpdate and preDisplaySide.
* Removed "Show who is looking at me", "Render focus indicator" and "Render lookat target" debug draw.
* Split "Show Look At Vectors" into "Show My Look At Vectors" and "Show Other Look At Vectors", to make it easier to debug eye tracking.
* "Show Look at Vectors" now draws the right eye red and the left eye blue.
* Removed Avatar and MyAvatar renderBody
* Removed look at rendering from head.
* GLMHelpers: Bugfix for generateBasisVectors when up primary and secondary axis were orthogonal
2016-05-08 16:20:32 -07:00

46 lines
1.2 KiB
C++

//
// DebugDraw.cpp
//
// Copyright 2015 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "DebugDraw.h"
#include "SharedUtil.h"
DebugDraw& DebugDraw::getInstance() {
static DebugDraw* instance = globalInstance<DebugDraw>("com.highfidelity.DebugDraw");
return *instance;
}
DebugDraw::DebugDraw() {
}
DebugDraw::~DebugDraw() {
}
// world space line, drawn only once
void DebugDraw::drawRay(const glm::vec3& start, const glm::vec3& end, const glm::vec4& color) {
_rays.push_back(Ray(start, end, color));
}
void DebugDraw::addMarker(const std::string& key, const glm::quat& rotation, const glm::vec3& position, const glm::vec4& color) {
_markers[key] = MarkerInfo(rotation, position, color);
}
void DebugDraw::removeMarker(const std::string& key) {
_markers.erase(key);
}
void DebugDraw::addMyAvatarMarker(const std::string& key, const glm::quat& rotation, const glm::vec3& position, const glm::vec4& color) {
_myAvatarMarkers[key] = MarkerInfo(rotation, position, color);
}
void DebugDraw::removeMyAvatarMarker(const std::string& key) {
_myAvatarMarkers.erase(key);
}