CalcPointAwayFromPoint
Talk0
3,772pages on
this wiki
this wiki
/////////////////////////////////////////////////////////////////////////////// // CalcPointAwayFromPoint /////////////////////////////////////////////////////////////////////////////// // Created By: Brock Heinz - OEI // Created On: 02/10/06 // Description: This will create a new point directly away from a starting // point // Arguments: // lPoint - The point you are starting from // lAwayFromPoint - The point you want to generate a new location away from // fDistance - How far away you want the new point to be. This can // be a negative value. (i.e. to generate a point nearer // or even past the away point // fAngularVariance - This will add some randomness to the position of the // new point. Values are in degrees, from 0 to 180 // bComputeDistFromStart - If TRUE, then the new point is fDistance away from // lPoint. If FALSE, then it is fDistance away from // lAwayFromPoint. // Returns: A location away from lAwayFromPoint based on the position of // lPoint. Note that if there is an error, lPoint is returned /////////////////////////////////////////////////////////////////////////////// location CalcPointAwayFromPoint( location lPoint, location lAwayFromPoint, float fDistance, float fAngularVariance, int bComputeDistFromStart );