CR feedback

This commit is contained in:
Brad Hefta-Gaub 2016-10-24 20:38:49 -07:00
parent 62f63f32a7
commit ed4279783d
3 changed files with 10 additions and 8 deletions

View file

@ -111,6 +111,8 @@ public:
void setDisplayPlugin(const DisplayPluginPointer& displayPlugin) { _currentDisplayPlugin = displayPlugin; } void setDisplayPlugin(const DisplayPluginPointer& displayPlugin) { _currentDisplayPlugin = displayPlugin; }
void setFrameInfo(uint32_t frame, const glm::mat4& camera) { _currentCamera = camera; } void setFrameInfo(uint32_t frame, const glm::mat4& camera) { _currentCamera = camera; }
float getHmdUiRadius() const { return _hmdUIRadius; }
signals: signals:
void allowMouseCaptureChanged(); void allowMouseCaptureChanged();
void alphaChanged(); void alphaChanged();

View file

@ -368,8 +368,11 @@ void HmdDisplayPlugin::updateFrameData() {
auto compositorHelper = DependencyManager::get<CompositorHelper>(); auto compositorHelper = DependencyManager::get<CompositorHelper>();
glm::mat4 modelMat = compositorHelper->getModelTransform().getMatrix(); glm::mat4 modelMat = compositorHelper->getModelTransform().getMatrix();
std::array<vec2, NUMBER_OF_HANDS> handGlowPoints{ { vec2(-1), vec2(-1) } }; static const float OUT_OF_BOUNDS = -1;
vec2 extraGlowPoint(-1); std::array<vec2, NUMBER_OF_HANDS> handGlowPoints { { vec2(OUT_OF_BOUNDS), vec2(OUT_OF_BOUNDS) } };
vec2 extraGlowPoint(OUT_OF_BOUNDS);
float uiRadius = compositorHelper->getHmdUiRadius();
// compute the glow point interesections // compute the glow point interesections
for (size_t i = 0; i < NUMBER_OF_HANDS; ++i) { for (size_t i = 0; i < NUMBER_OF_HANDS; ++i) {
@ -396,9 +399,6 @@ void HmdDisplayPlugin::updateFrameData() {
} }
castStart += glm::quat_cast(model) * grabPointOffset; castStart += glm::quat_cast(model) * grabPointOffset;
// FIXME fetch the actual UI radius from... somewhere?
float uiRadius = 1.0f;
// Find the intersection of the laser with he UI and use it to scale the model matrix // Find the intersection of the laser with he UI and use it to scale the model matrix
float distance; float distance;
if (!glm::intersectRaySphere(castStart, castDirection, if (!glm::intersectRaySphere(castStart, castDirection,