Given two vectors A and B which form the line segment L = A-B. Furthermore given a view frustum F which is defined by its left, right, bottom, top, near and far planes.
How do I clip L against F?
That is, test for an intersection and where on L that intersection occurs? (Keep in mind that a line segment can have more than one intersection with the frustum if it intersects two sides at a corner.)
If possible, provide a code example please (C++ or Python preferred).
I don't want to get into writing code for this now but if I understand "frustum" correctly the following should work.
But I may have completely misunderstood. In that case please elaborate :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With