<div class="gmail_quote">On Thu, Jan 21, 2010 at 7:35 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div>Often I use the IntersectWithLine function when I really want to intersect an infinite ray. I'll do something like this:</div><div><br></div><div>P2 = P1 + 1e5 * V (unit vector)</div><div>IntersectWithLine(..., P1, P2, ....)</div>
<div><br></div><div>Can we hide this "hack" from users with something like:</div><div><br></div><div>IntersectWithRay(P1, V)</div><div>{</div><div>double inf = std::numeric_limits<double>::infinity(); </div>
<div>//clearly not actually infinity, but some very large number</div><div>//or we could compute the maximum projection along the line of the object to be intersected, and use this value + epsilon</div><div>P2 = P1 + inf * V (unit vector)</div>
<div>IntersectWithLine(P1, P2)</div><div>}</div><div><br></div><div>Thoughts?<br><div><br><div>David<br>
</div></div></div>
</blockquote></div><div><br></div>Any thoughts on this?<br><div><br clear="all">Thanks,<br><br>David<br></div>