Ejemplo n.º 1
0
 /// <summary>
 /// Returns a new <see cref="Line2D"/> from a pair of strings which represent points.
 /// See <see cref="Point2D.Parse(string, IFormatProvider)" /> for details on acceptable formats.
 /// </summary>
 /// <param name="startPointString">The string representation of the first point.</param>
 /// <param name="endPointString">The string representation of the second point.</param>
 /// <returns>A line segment from the first point to the second point.</returns>
 public static LineSegment3D Parse(string startPointString, string endPointString)
 {
     return(new LineSegment3D(Point3D.Parse(startPointString), Point3D.Parse(endPointString)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a Line from its string representation
 /// </summary>
 /// <param name="startPoint">The string representation of the startpoint</param>
 /// <param name="endPoint">The string representation of the endpoint</param>
 /// <returns></returns>
 public static Line3D Parse(string startPoint, string endPoint)
 {
     return(new Line3D(Point3D.Parse(startPoint), Point3D.Parse(endPoint)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Parses string representation of throughpoint and direction
 /// See <see cref="Point3D.Parse(string, IFormatProvider)" /> and  <see cref="UnitVector3D.Parse(string, IFormatProvider, double)" /> for details on acceptable formats.
 /// This is mainly meant for tests
 /// </summary>
 /// <param name="point">a string representing a start point for the ray.</param>
 /// <param name="direction">a string representing a direction for the ray.</param>
 /// <returns>A ray.</returns>
 public static Ray3D Parse(string point, string direction)
 {
     return(new Ray3D(Point3D.Parse(point), UnitVector3D.Parse(direction)));
 }