diff options
Diffstat (limited to 'doc/Manual/en/BH_Ray2f.pod')
| -rw-r--r-- | doc/Manual/en/BH_Ray2f.pod | 205 |
1 files changed, 205 insertions, 0 deletions
diff --git a/doc/Manual/en/BH_Ray2f.pod b/doc/Manual/en/BH_Ray2f.pod new file mode 100644 index 0000000..c116a0a --- /dev/null +++ b/doc/Manual/en/BH_Ray2f.pod @@ -0,0 +1,205 @@ +=encoding UTF-8 + + +=head1 NAME + +BH_Ray2f, BH_Segment2f - Ray/segment on a plane + + +=head1 SYNTAX + + #include <BH/Math/Ray2f.h> + + 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<start> and I<direction> describe the ray. + +The parameter I<line> describes the line. + +The parameter I<t> describes the resulting time of the ray's intersection. + +The parameter I<out> 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<aStart> and I<aDirection> describe the first ray. + +The parameters I<bStart> and I<bDirection> describe the second ray. + +The parameter I<time1> describes the resulting intersection time of the first +ray. + +The parameter I<time2> 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<aStart> and I<aDirection> describe the first ray. + +The parameters I<bStart> and I<bDirection> describe the second ray. + +The parameter I<t> describes the resulting intersection time of the first ray. + +The parameter I<out> 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<aStart> and I<aDirection> describe the ray. + +The parameters I<bStart> and I<bEnd> describe the segment. + +The parameter I<t> describes the resulting intersection time of the ray. + +The parameter I<out> 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<start> and I<end> describe the segment. + +The parameter I<line> describes the line. + +The parameter I<t> describes the resulting intersection time of the segment. + +The parameter I<out> 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<aStart> and I<aEnd> describe the first segment. + +The parameters I<bStart> and I<bEnd> describe the second segment. + +The parameter I<t> describes the resulting intersection time of the first +segment. + +The parameter I<out> 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<aStart> and I<aDirection> describe the ray. + +The parameters I<bMin> and I<bMax> describe the bounding box. + +The parameter I<t> describes the resulting intersection time of the ray. + +The parameter I<out> 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<aStart> and I<aEnd> describe the segment. + +The parameters I<bMin> and I<bMax> describe the bounding box. + +The parameter I<t> describes the resulting intersection time of the segment. + +The parameter I<out> describes the resulting intersection point. + +If successful, the function returns 0, otherwise it returns an error code. + + +=head1 SEE ALSO + +L<BH> |
