This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Computes the intersection points between a frustum and an infinite line. | |
/// Finds the visible part of a segment in respect of a camera frustum. | |
/// Returns false if the line is not visible at all. | |
/// </summary> | |
/// <example> | |
/// var planes = GeometryUtility.CalculateFrustumPlanes(camera); | |
/// if (GetFrustumLineIntersection(camera, planes, ray, out d1, out d2)) { | |
/// Gizmos.DrawLine(ray.GetPoint(d1), ray.GetPoint(d2)); | |
/// } |