From 18cb15ee7dfd66483e1a2187705ce2769c48e2bc Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 22 Sep 2014 15:31:46 -0700 Subject: [PATCH] Warning fixes. --- interface/src/MetavoxelSystem.cpp | 13 ++++++++++--- interface/src/MetavoxelSystem.h | 4 ++-- interface/src/avatar/Avatar.cpp | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/interface/src/MetavoxelSystem.cpp b/interface/src/MetavoxelSystem.cpp index a0ce30d1dc..b0a1a3413d 100644 --- a/interface/src/MetavoxelSystem.cpp +++ b/interface/src/MetavoxelSystem.cpp @@ -2319,9 +2319,16 @@ void StaticModelRenderer::renderUnclipped(float alpha, Mode mode) { _model->render(alpha); } -bool StaticModelRenderer::findRayIntersection(RayIntersectionInfo& intersection, - const glm::vec3& clipMinimum, float clipSize) const { - return _model->findRayIntersection(intersection); +bool StaticModelRenderer::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, + const glm::vec3& clipMinimum, float clipSize, float& distance) const { + RayIntersectionInfo info; + info._rayStart = origin; + info._rayDirection = direction; + if (!_model->findRayIntersection(info)) { + return false; + } + distance = info._hitDistance; + return true; } void StaticModelRenderer::applyTranslation(const glm::vec3& translation) { diff --git a/interface/src/MetavoxelSystem.h b/interface/src/MetavoxelSystem.h index cc402bcea1..f99a5834c9 100644 --- a/interface/src/MetavoxelSystem.h +++ b/interface/src/MetavoxelSystem.h @@ -370,8 +370,8 @@ public: virtual void init(Spanner* spanner); virtual void simulate(float deltaTime); - virtual bool findRayIntersection(RayIntersectionInfo& intersection, - const glm::vec3& clipMinimum, float clipSize) const; + virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, + const glm::vec3& clipMinimum, float clipSize, float& distance) const; protected: diff --git a/interface/src/avatar/Avatar.cpp b/interface/src/avatar/Avatar.cpp index 6907a82421..3eae0ef382 100644 --- a/interface/src/avatar/Avatar.cpp +++ b/interface/src/avatar/Avatar.cpp @@ -505,7 +505,7 @@ void Avatar::renderBody(RenderMode renderMode, bool postLighting, float glowLeve { Glower glower(glowLevel); - if (_shouldRenderBillboard || !(_skeletonModel.isRenderable() && getHead()->getFaceModel().isRenderable()) && + if ((_shouldRenderBillboard || !(_skeletonModel.isRenderable() && getHead()->getFaceModel().isRenderable())) && (postLighting || renderMode == SHADOW_RENDER_MODE)) { // render the billboard until both models are loaded renderBillboard();