From ff0872a5f068eae817eee1ad9cea78957b3491c0 Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Fri, 12 Sep 2014 08:38:44 -0700 Subject: [PATCH] add RayIntersectionInfo::getIntersectionPoint() --- libraries/shared/src/RayIntersectionInfo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/shared/src/RayIntersectionInfo.h b/libraries/shared/src/RayIntersectionInfo.h index 2d24282b5d..6c4eb3f8dd 100644 --- a/libraries/shared/src/RayIntersectionInfo.h +++ b/libraries/shared/src/RayIntersectionInfo.h @@ -21,6 +21,8 @@ public: RayIntersectionInfo() : _rayStart(0.0f), _rayDirection(1.0f, 0.0f, 0.0f), _rayLength(FLT_MAX), _hitDistance(FLT_MAX), _hitNormal(1.0f, 0.0f, 0.0f), _hitShape(NULL) { } + glm::vec3 getIntersectionPoint() const { return _rayStart + _hitDistance * _rayDirection; } + // input glm::vec3 _rayStart; glm::vec3 _rayDirection;