Search Results for

    Show / Hide Table of Contents

    Class Segment

    Models a constraint segment in a triangulation. A constraint segment is an oriented straight line segment between a start point and an end point.

    Inheritance
    object
    Segment
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: NetTopologySuite.Triangulate
    Assembly: NetTopologySuite.dll
    Syntax
    public class Segment

    Constructors

    | Edit this page View Source

    Segment(Coordinate, Coordinate)

    Creates a new instance for the given points.

    Declaration
    public Segment(Coordinate p0, Coordinate p1)
    Parameters
    Type Name Description
    Coordinate p0

    the start point

    Coordinate p1

    the end point

    | Edit this page View Source

    Segment(Coordinate, Coordinate, object)

    Creates a new instance for the given points, with associated external data.

    Declaration
    public Segment(Coordinate p0, Coordinate p1, object data)
    Parameters
    Type Name Description
    Coordinate p0

    the start point

    Coordinate p1

    the end point

    object data

    an external data object

    | Edit this page View Source

    Segment(double, double, double, double, double, double)

    Creates a new instance for the given ordinates.

    Declaration
    public Segment(double x1, double y1, double z1, double x2, double y2, double z2)
    Parameters
    Type Name Description
    double x1
    double y1
    double z1
    double x2
    double y2
    double z2
    | Edit this page View Source

    Segment(double, double, double, double, double, double, object)

    Creates a new instance for the given ordinates, with associated external data.

    Declaration
    public Segment(double x1, double y1, double z1, double x2, double y2, double z2, object data)
    Parameters
    Type Name Description
    double x1
    double y1
    double z1
    double x2
    double y2
    double z2
    object data

    Properties

    | Edit this page View Source

    Data

    Gets or sets the external data associated with this segment

    Declaration
    public object Data { get; set; }
    Property Value
    Type Description
    object
    Remarks

    a data object

    | Edit this page View Source

    End

    Gets the end coordinate of the segment

    Declaration
    public Coordinate End { get; }
    Property Value
    Type Description
    Coordinate
    Remarks

    a Coordinate

    | Edit this page View Source

    EndX

    Gets the end X ordinate of the segment

    Declaration
    public double EndX { get; }
    Property Value
    Type Description
    double
    Remarks

    the X ordinate value

    | Edit this page View Source

    EndY

    Gets the end Y ordinate of the segment

    Declaration
    public double EndY { get; }
    Property Value
    Type Description
    double
    Remarks

    he Y ordinate value

    | Edit this page View Source

    EndZ

    Gets the end Z ordinate of the segment

    Declaration
    public double EndZ { get; }
    Property Value
    Type Description
    double
    Remarks

    the Z ordinate value

    | Edit this page View Source

    LineSegment

    Gets a LineSegment modelling this segment.

    Declaration
    public LineSegment LineSegment { get; }
    Property Value
    Type Description
    LineSegment
    Remarks

    a LineSegment

    | Edit this page View Source

    Start

    Gets the start coordinate of the segment

    Declaration
    public Coordinate Start { get; }
    Property Value
    Type Description
    Coordinate
    Remarks

    a Coordinate

    | Edit this page View Source

    StartX

    Gets the start X ordinate of the segment

    Declaration
    public double StartX { get; }
    Property Value
    Type Description
    double
    Remarks

    the X ordinate value

    | Edit this page View Source

    StartY

    Gets the start Y ordinate of the segment

    Declaration
    public double StartY { get; }
    Property Value
    Type Description
    double
    Remarks

    the Y ordinate value

    | Edit this page View Source

    StartZ

    Gets the start Z ordinate of the segment

    Declaration
    public double StartZ { get; }
    Property Value
    Type Description
    double
    Remarks

    the Z ordinate value

    Methods

    | Edit this page View Source

    EqualsTopologically(Segment)

    Determines whether two segments are topologically equal. I.e. equal up to orientation.

    Declaration
    public bool EqualsTopologically(Segment s)
    Parameters
    Type Name Description
    Segment s

    a segment

    Returns
    Type Description
    bool

    true if the segments are topologically equal

    | Edit this page View Source

    Intersection(Segment)

    Computes the intersection point between this segment and another one.

    Declaration
    public Coordinate Intersection(Segment s)
    Parameters
    Type Name Description
    Segment s

    a segment

    Returns
    Type Description
    Coordinate

    the intersection point, or null if there is none

    | Edit this page View Source

    ToString()

    Computes a string representation of this segment.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    a string

    Overrides
    object.ToString()
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX