Segment2D Class

Defines a 2D segment.
Public Class Segment2D 
Implements ICloneable
This language is not supported or no code example is available.
public class Segment2D : ICloneable
This language is not supported or no code example is available.
Name Description
Protected constructor Segment2D(Segment2D)
Public constructor Segment2D() Empty constructor.
Public constructor Segment2D(Point2D, Point2D) Point2D constructor.
Public constructor Segment2D(Point, Point) System.Drawing.Point constructor.
Public constructor Segment2D(double, double, double, double) Individual coordinates constructor.
Top
Name Description
Public property IsPoint If true, the segment is a degenerated one (a point).
Public property Length Gets the 2D segment length.
Public property MidPoint Gets the segment mid point.
Public property Normal Gets the 2D segment normal vector (not normalized).
Top
Methods
 
Name Description
Public method Static AreCollinear(Segment2D, Segment2D) Returns true if the two segments are collinear.
Public method Static AreOverlapping(Segment2D, Segment2D) Returns true if the two segments are overlapping.
Public method Clone() Creates a deep copy of this 2D segment.
Public method ClosestPointTo(Point2D) Finds the point inside the segment that is closest to given point.
Public method ConvertToSurrogate()
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Public method ExtendBy(double, double) Extends the segment of the amount provided.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Public method GetType Gets the Type of the current instance. (inherited from Object).
Public method Static Intersection(Segment2D, Segment2D, out Point2D) Computes the intersection of two 2D segments.
Public method Static Intersection(Segment2D, Segment2D, out Point2D, out Point2D, double) Computes the intersection of two 2D segments.
Public method Static IntersectionAndT(Segment2D, Segment2D, out Point2D) Computes the intersection of two 2D segments.
Public method Static IntersectionLine(Segment2D, Segment2D, out Point2D) Computes the intersection of two infinite 2D lines.
Public method Static IntersectionLineInternal(Segment2D, Segment2D, out double, out double, out Point2D)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Public method Offset(double)
Public method PointAt(double) Evaluates a point on (infinite) segment.
Public method Project(Point2D) Finds the point on the (infinite) line that is closest to given point.
Public method Tan()
Public method ToString() Converts this 2D segment to a human readable string.
Top
Fields
 
Name Description
Public field P0 Start point.
Public field P1 End point.
Top
devDept.Geometry.Segment2D

.NET Framework

Supported in: 4.8

In this article

Definition