SquareOfPointToLineSegmentDistance

From Solid Graphics Wiki

Jump to: navigation, search
SquareOfPointToLineSegmentDistance
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 SquareOfPointToLineSegmentDistance function returns square of shortest distance from line segment to point.

float SquareOfPointToLineSegmentDistance
         (
         const float rkPoint[ 3 ],
         const float P0[ 3 ],
         const float P1[ 3 ]
         );
double SquareOfPointToLineSegmentDistance
         (
         const double rkPoint[ 3 ],
         const double P0[ 3 ],
         const double P1[ 3 ]
         );


Parameters

rkPoint x,y,z coordinates of the point
P0 x,y,z coordinates of first point defining the line segment
P1 x,y,z coordinates of second point defining the line segment

Return Value

The square of shortest distance from the line segment to the point.

See Also


   


SolidKit Library Documentation

Personal tools