]> git.mxchange.org Git - simgear.git/blobdiff - simgear/math/vector.hxx
Fix a build order problem.
[simgear.git] / simgear / math / vector.hxx
index ef97e7de35af8134b0226c68bb00e8f11fb3e20d..84029aa35a97e38c111adf6159a43d3b239add4c 100644 (file)
@@ -92,15 +92,25 @@ inline void sgCopyNegateVec4( sgVec4 dst, sgVec4 src )
        dst [ 3 ] = -src [ 3 ] ;
 }
 
+// Given a point p, and a line through p0 with direction vector d,
+// find the closest point (p1) on the line
+void sgClosestPointToLine( sgVec3 p1, const sgVec3 p, const sgVec3 p0,
+                          const sgVec3 d );
+
+// Given a point p, and a line through p0 with direction vector d,
+// find the closest point (p1) on the line
+void sgdClosestPointToLine( sgdVec3 p1, const sgdVec3 p, const sgdVec3 p0,
+                           const sgdVec3 d );
+
 // Given a point p, and a line through p0 with direction vector d,
 // find the shortest distance (squared) from the point to the line
-double sgPointLineDistSquared( const sgVec3 p, const sgVec3 p0,
-                              const sgVec3 d );
+double sgClosestPointToLineDistSquared( const sgVec3 p, const sgVec3 p0,
+                                       const sgVec3 d );
 
 // Given a point p, and a line through p0 with direction vector d,
 // find the shortest distance (squared) from the point to the line
-double sgdPointLineDistSquared( const sgdVec3 p, const sgdVec3 p0,
-                               const sgdVec3 d );
+double sgdClosestPointToLineDistSquared( const sgdVec3 p, const sgdVec3 p0,
+                                        const sgdVec3 d );
 
 // This is same as
 // sgMakeMatTrans4( sgMat4 sgTrans, sgVec3 trans )