ug4
lineintersect_utils.h
Go to the documentation of this file.
1 /* Copyright (C) Graham Rhodes, 2001.
2  * All rights reserved worldwide.
3  *
4  * This software is provided "as is" without express or implied
5  * warranties. You may freely copy and compile this source into
6  * applications you distribute provided that the copyright text
7  * below is included in the resulting source code, for example:
8  * "Portions Copyright (C) Graham Rhodes, 2001"
9  */
10 /**************************************************************************************
11 |
12 | File: lineintersect_utils.h
13 |
14 | Purpose: Function prototypes for line segment intersection utility functions
15 |
16 | Book Title: Game Programming Gems II
17 |
18 | Chapter Title: Fast, Robust Intersection of 3D Line Segments
19 |
20 | Author: Graham Rhodes
21 |
22 | Revisions: 05-Apr-2001 - GSR. Original.
23 |
24 **************************************************************************************/
25 #ifndef _lineintersect_utils_h
26 #define _lineintersect_utils_h
27 
28 #include "common/types.h"
29 
32 
33 void IntersectLineSegments(const number A1x, const number A1y, const number A1z,
34  const number A2x, const number A2y, const number A2z,
35  const number B1x, const number B1y, const number B1z,
36  const number B2x, const number B2y, const number B2z,
37  bool infinite_lines, number epsilon, number &PointOnSegAx,
38  number &PointOnSegAy, number &PointOnSegAz, number &PointOnSegBx,
39  number &PointOnSegBy, number &PointOnSegBz, number &NearestPointX,
40  number &NearestPointY, number &NearestPointZ, number &NearestVectorX,
41  number &NearestVectorY, number &NearestVectorZ, bool &true_intersection);
42 
43 void FindNearestPointOnLineSegment(const number A1x, const number A1y, const number A1z,
44  const number Lx, const number Ly, const number Lz,
45  const number Bx, const number By, const number Bz,
46  bool infinite_line, number epsilon_squared, number &NearestPointX,
47  number &NearestPointY, number &NearestPointZ,
48  number &parameter);
49 
51  number A2x, number A2y, number A2z,
52  number Lax, number Lay, number Laz,
53  number B1x, number B1y, number B1z,
54  number B2x, number B2y, number B2z,
55  number Lbx, number Lby, number Lbz,
56  bool infinite_lines, number epsilon_squared,
57  number &PointOnSegAx, number &PointOnSegAy, number &PointOnSegAz,
58  number &PointOnSegBx, number &PointOnSegBy, number &PointOnSegBz);
59 
60 void AdjustNearestPoints(number A1x, number A1y, number A1z,
61  number Lax, number Lay, number Laz,
62  number B1x, number B1y, number B1z,
63  number Lbx, number Lby, number Lbz,
64  number epsilon_squared, number s, number t,
65  number &PointOnSegAx, number &PointOnSegAy, number &PointOnSegAz,
66  number &PointOnSegBx, number &PointOnSegBy, number &PointOnSegBz);
67 
68 // end group ugbase_math
70 
71 #endif // _lineintersect_utils_h
double number
Definition: types.h:124
void AdjustNearestPoints(number A1x, number A1y, number A1z, number Lax, number Lay, number Laz, number B1x, number B1y, number B1z, number Lbx, number Lby, number Lbz, number epsilon_squared, number s, number t, number &PointOnSegAx, number &PointOnSegAy, number &PointOnSegAz, number &PointOnSegBx, number &PointOnSegBy, number &PointOnSegBz)
Definition: lineintersect_utils.cpp:406
void FindNearestPointOnLineSegment(const number A1x, const number A1y, const number A1z, const number Lx, const number Ly, const number Lz, const number Bx, const number By, const number Bz, bool infinite_line, number epsilon_squared, number &NearestPointX, number &NearestPointY, number &NearestPointZ, number &parameter)
Definition: lineintersect_utils.cpp:238
void FindNearestPointOfParallelLineSegments(number A1x, number A1y, number A1z, number A2x, number A2y, number A2z, number Lax, number Lay, number Laz, number B1x, number B1y, number B1z, number B2x, number B2y, number B2z, number Lbx, number Lby, number Lbz, bool infinite_lines, number epsilon_squared, number &PointOnSegAx, number &PointOnSegAy, number &PointOnSegAz, number &PointOnSegBx, number &PointOnSegBy, number &PointOnSegBz)
Definition: lineintersect_utils.cpp:305
void IntersectLineSegments(const number A1x, const number A1y, const number A1z, const number A2x, const number A2y, const number A2z, const number B1x, const number B1y, const number B1z, const number B2x, const number B2y, const number B2z, bool infinite_lines, number epsilon, number &PointOnSegAx, number &PointOnSegAy, number &PointOnSegAz, number &PointOnSegBx, number &PointOnSegBy, number &PointOnSegBz, number &NearestPointX, number &NearestPointY, number &NearestPointZ, number &NearestVectorX, number &NearestVectorY, number &NearestVectorZ, bool &true_intersection)
Definition: lineintersect_utils.cpp:85