예제 #1
0
 /// <summary>
 /// Checks if two lines are parallel to each other.
 /// </summary>
 /// <param name="line1">First line.</param>
 /// <param name="line2">Second line.</param>
 /// <returns></returns>
 public static bool IsParallel(Line3D line1, Line3D line2)
 {
     return(IsParallel(line1.DirectionVector, line2.DirectionVector));
 }
예제 #2
0
 /// <summary>
 /// Calculates the angle between two lines in radians.
 /// </summary>
 /// <param name="line1">First line.</param>
 /// <param name="line2">Second line.</param>
 /// <returns></returns>
 public static double AngleBetween(Line3D line1, Line3D line2)
 {
     return(AngleBetween(line1.DirectionVector, line2.DirectionVector));
 }
예제 #3
0
 /// <summary>
 /// Calculates the angle between a plane and a line in radians.
 /// </summary>
 /// <param name="plane">A plane.</param>
 /// <param name="line">A line</param>
 /// <returns></returns>
 public static double AngleBetween(Plane3D plane, Line3D line)
 {
     return(Math.PI / 2 - AngleBetween(plane.NormalVector, line.DirectionVector));
 }
예제 #4
0
 /// <summary>
 /// Calculates the angle between a line and a vector in radians.
 /// </summary>
 /// <param name="line">A line.</param>
 /// <param name="vector">A vector.</param>
 /// <returns></returns>
 public static double AngleBetween(Line3D line, Vect3D vector)
 {
     return(AngleBetween(line.DirectionVector, vector));
 }