Skip to content

Commit

Permalink
repair overlooked functionality in Ray (cached version)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungbq authored and imikejackson committed Aug 2, 2024
1 parent 9341c0f commit dd9f7d3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/simplnx/Common/Ray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ class Ray
void setOrigin(const PointType& origin)
{
m_Origin = origin;

if constexpr(CacheEndV)
{
m_Endpoint = calculateEndpoint();
}
}

/**
Expand Down Expand Up @@ -138,6 +143,11 @@ class Ray
void setLength(LengthType length)
{
m_Length = length;

if constexpr(CacheEndV)
{
m_Endpoint = calculateEndpoint();
}
}

/**
Expand Down

0 comments on commit dd9f7d3

Please sign in to comment.