ClosestLinePointPosition

From Solid Graphics Wiki

Jump to: navigation, search
ClosestLinePointPosition
Namespace: SKL3D
Member of: (this function is not member of any class)
Include: Skl3DMath.h
Lib (Release): SKL.lib
Lib (Debug): SKL_D.lib

The ClosestLinePointPosition function calculates position of a point lying on a specified line closest to a specified point.

float ClosestLinePointPosition
         (
         const float RP0[ 3 ],
         const float RP1[ 3 ],
         const float P[ 3 ]
         );
double ClosestLinePointPosition
         (
         const double RP0[ 3 ],
         const double RP1[ 3 ],
         const double P[ 3 ]
         );


Parameters

RP0 x,y,z coordinates of first point defining the line
RP1 x,y,z coordinates of second point defining the line
P x,y,z coordinates of the point for which the function finds the closest line-point.

Return Value

The function returns position of a point lying on the specified line closest to the specified point. The returned position value can be translated to the point coordinates using the LinePositionToPoint function.

See Also


   


SolidKit Library Documentation

Personal tools