=encoding UTF-8 =head1 NAME BH_Ray2f, BH_Segment2f - Ray/segment on a plane =head1 SYNTAX #include cc prog.c -o prog -lbh =head1 DESCRIPTION This module provides functions for working with rays and segments on a plane. It includes functions for checking intersections between rays, segments, lines, and bounding rectangles. =head1 API CALLS =head2 BH_Ray2fIntersectLine int BH_Ray2fIntersectLine(const float start[2], const float direction[2], const float line[3], float *t, float out[2]); Checks the intersection between a ray and a line. The parameters I and I describe the ray. The parameter I describes the line. The parameter I describes the resulting time of the ray's intersection. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Ray2fIntersectTime int BH_Ray2fIntersectTime(const float aStart[2], const float aDirection[2], const float bStart[2], const float bDirection[2], float *time1, float *time2); Calculates the intersection time between two rays. The parameters I and I describe the first ray. The parameters I and I describe the second ray. The parameter I describes the resulting intersection time of the first ray. The parameter I describes the resulting intersection time of the second ray. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Ray2fIntersectRay int BH_Ray2fIntersectRay(const float aStart[2], const float aDirection[2], const float bStart[2], const float bDirection[2], float *t, float out[2]); Checks the intersection between two rays. The parameters I and I describe the first ray. The parameters I and I describe the second ray. The parameter I describes the resulting intersection time of the first ray. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Ray2fIntersectSegment int BH_Ray2fIntersectSegment(const float aStart[2], const float aDirection[2], const float bStart[2], const float bEnd[2], float *t, float out[2]); Checks the intersection between a ray and a segment. The parameters I and I describe the ray. The parameters I and I describe the segment. The parameter I describes the resulting intersection time of the ray. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Segment2fIntersectLine int BH_Segment2fIntersectLine(const float start[2], const float end[2], const float line[3], float *t, float out[2]); Checks the intersection between a segment and a line. The parameters I and I describe the segment. The parameter I describes the line. The parameter I describes the resulting intersection time of the segment. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Segment2fIntersectSegment int BH_Segment2fIntersectSegment(const float aStart[2], const float aEnd[2], const float bStart[2], const float bEnd[2], float *t, float out[2]); Checks the intersection between two segments. The parameters I and I describe the first segment. The parameters I and I describe the second segment. The parameter I describes the resulting intersection time of the first segment. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Ray2fIntersectBox2f int BH_Ray2fIntersectBox2f(const float aStart[2], const float aDirection[2], const float bMin[2], const float bMax[2], float *t, float out[2]); Checks the intersection between a ray and a bounding box. The parameters I and I describe the ray. The parameters I and I describe the bounding box. The parameter I describes the resulting intersection time of the ray. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head2 BH_Segment2fIntersectBox2f int BH_Segment2fIntersectBox2f(const float aStart[2], const float aEnd[2], const float bMin[2], const float bMax[2], float *t, float out[2]); Checks the intersection between a segment and a bounding box. The parameters I and I describe the segment. The parameters I and I describe the bounding box. The parameter I describes the resulting intersection time of the segment. The parameter I describes the resulting intersection point. If successful, the function returns 0, otherwise it returns an error code. =head1 SEE ALSO L