Commit e31d87c0 authored by michael's avatar michael

--no commit message

--no commit message
parent 3a1bbc43
......@@ -71,8 +71,8 @@ LrRay::operator = (const LrRay &source)
bool
operator == (const LrRay &lhs, const LrRay &rhs)
{
return (lhs.m_direction == rhs.m_direction)
&& (lhs.m_origin == rhs.m_origin);
return ( (lhs.m_direction == rhs.m_direction)
&& (lhs.m_origin == rhs.m_origin));
}
bool
......@@ -111,10 +111,10 @@ LrRay::setOrigin(const LrPoint &origin)
//obtenir les coordonées du point situe a une distance k
LrPoint
LrRay::getPoint(REAL distanceK)
LrRay::getPoint(Real distanceK)const
{
//Pres = Porigine + K*V
LrPoint Pres(m_origin.translate + (distanceK*m_direction));
return Pres;
return LrPoint::translate(m_origin, (distanceK*m_direction));
}
......@@ -13,6 +13,7 @@
#include "LrVector.h"
#include "LrPoint.h"
#include "config.h"
class LrRay
{
......@@ -72,9 +73,9 @@ public:
/**
* @brief obtenir les coordonées du point situe a une distance k
* @param distanceK REAL la distance situee entre l'origine et le point desire
* @param distanceK Real la distance situee entre l'origine et le point desire
*/
LrPoint getPoint(REAL distanceK);
LrPoint getPoint(Real distanceK)const;
private:
LrVector m_direction;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment