Esempio n. 1
0
 /// <summary>
 /// Projects a point to the given plane along the given direction.
 /// </summary>
 /// <param name="point"></param>
 /// <param name="direction"></param>
 /// <param name="origin"></param>
 /// <param name="normal"></param>
 /// <returns></returns>
 public static Vector3d ProjectToPlaneAlong(Vector3d point, Vector3d origin, Vector3d normal, Vector3d direction)
 {
     return(point + Vector3d.MatchProjection(direction, origin - point, normal));
 }
Esempio n. 2
0
 /// <summary>
 /// Projects a vector to the given plane along the given direction.
 /// </summary>
 /// <param name="vector"></param>
 /// <param name="normal"></param>
 /// <param name="direction"></param>
 /// <returns></returns>
 public static Vector3d ProjectToPlaneAlong(Vector3d vector, Vector3d normal, Vector3d direction)
 {
     return(vector - Vector3d.MatchProjection(direction, vector, normal));
 }