math/projections.bi

Summary
math/projections.bi
LicenseCopyright © 2007-2011, FreeBASIC Extended Library Development Group
ext.math
Functions
GetProjectedPointFinds the closest point on a line from a point in 2D space.
ClampProjectedPointFinds the closest point on a line segment from a point in 2D space.

License

Copyright © 2007-2011, FreeBASIC Extended Library Development Group

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com/p/fb-extended-lib/wiki/License

ext.math

Summary
Functions
GetProjectedPointFinds the closest point on a line from a point in 2D space.
ClampProjectedPointFinds the closest point on a line segment from a point in 2D space.

Functions

GetProjectedPoint

declare function GetProjectedPoint overload (
   byval l as fbext_Line2(( T_)),
   byval p as fbext_Vector2(( T_))
) as fbext_Vector2(( T_))

Finds the closest point on a line from a point in 2D space.

parameters

la line.
pa point.

ClampProjectedPoint

declare function ClampProjectedPoint overload (
   byval l as fbext_Line2(( T_)),
   byval p as fbext_Vector2(( T_))
) as fbext_Vector2(( T_))

Finds the closest point on a line segment from a point in 2D space.

parameters

la line segment.
pa point.
declare function GetProjectedPoint overload (
   byval l as fbext_Line2(( T_)),
   byval p as fbext_Vector2(( T_))
) as fbext_Vector2(( T_))
Finds the closest point on a line from a point in 2D space.
declare function ClampProjectedPoint overload (
   byval l as fbext_Line2(( T_)),
   byval p as fbext_Vector2(( T_))
) as fbext_Vector2(( T_))
Finds the closest point on a line segment from a point in 2D space.