/**************************************************************************************** * \file Ray.cxx * \author Diren D Bharwani, diren.dbharwani, 390002520 * \brief Implementation for the managed Ray struct. * * \copyright Copyright (C) 2022 DigiPen Institute of Technology. Reproduction or * disclosure of this file or its contents without the prior written consent * of DigiPen Institute of Technology is prohibited. ****************************************************************************************/ #include "SHpch.h" // Primary Header #include "Ray.hxx" namespace SHADE { /*-----------------------------------------------------------------------------------*/ /* Constructor Definitions */ /*-----------------------------------------------------------------------------------*/ Ray::Ray(Vector3 position, Vector3 direction) { Position = position; Direction = direction; } /*-----------------------------------------------------------------------------------*/ /* Function Member Definitions */ /*-----------------------------------------------------------------------------------*/ void Ray::LookAt(Vector3 target) { Direction = (target - Position).GetNormalised(); } } // namespace SHADE