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.
Inherited Members
Namespace: NetTopologySuite.Triangulate
Assembly: NetTopologySuite.dll
Syntax
public class Segment
Constructors
| Edit this page View SourceSegment(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 |
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 |
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 |
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 SourceData
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
End
Gets the end coordinate of the segment
Declaration
public Coordinate End { get; }
Property Value
Type | Description |
---|---|
Coordinate |
Remarks
a Coordinate
EndX
Gets the end X ordinate of the segment
Declaration
public double EndX { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
the X ordinate value
EndY
Gets the end Y ordinate of the segment
Declaration
public double EndY { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
he Y ordinate value
EndZ
Gets the end Z ordinate of the segment
Declaration
public double EndZ { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
the Z ordinate value
LineSegment
Gets a LineSegment modelling this segment.
Declaration
public LineSegment LineSegment { get; }
Property Value
Type | Description |
---|---|
LineSegment |
Remarks
a LineSegment
Start
Gets the start coordinate of the segment
Declaration
public Coordinate Start { get; }
Property Value
Type | Description |
---|---|
Coordinate |
Remarks
a Coordinate
StartX
Gets the start X ordinate of the segment
Declaration
public double StartX { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
the X ordinate value
StartY
Gets the start Y ordinate of the segment
Declaration
public double StartY { get; }
Property Value
Type | Description |
---|---|
double |
Remarks
the Y ordinate value
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 SourceEqualsTopologically(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 |
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 |
ToString()
Computes a string representation of this segment.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | a string |