Commit 7a4d5345 authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

ART - Ray

- bugfix in interpolation to point of minimum distance to receiver
parent 13ba1068
......@@ -178,11 +178,11 @@ void CRay::InterpolateToRealMinimumPosition(const VistaVector3D& receiverPos)
VistaVector3D rBefore = rTmpMin;
if (iMinReceiverDistance > 0)
rBefore = ClosestPointOnLineSegmentToReceiver(rTmpMin, at(iMinReceiverDistance + 1).position, receiverPos);
rBefore = ClosestPointOnLineSegmentToReceiver(rTmpMin, at(iMinReceiverDistance - 1).position, receiverPos);
dMin = (rAfter - receiverPos).GetLength();
const float dMinBefore = (rAfter - receiverPos).GetLength();
const float dMinBefore = (rBefore - receiverPos).GetLength();
if (dMinBefore < dMin)
{
iMinReceiverDistance--;
......
Supports Markdown
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