public class Segment extends Object
| Constructor and Description |
|---|
Segment(Coordinate
Creates a new instance for the given points.
|
Segment(Coordinate
Creates a new instance for the given points, with associated external data.
|
Segment(double x1, double y1, double z1, double x2, double y2, double z2)
Creates a new instance for the given ordinates.
|
Segment(double x1, double y1, double z1, double x2, double y2, double z2, Object
Creates a new instance for the given ordinates, with associated external data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsTopo(Segment
Determines whether two segments are topologically equal.
|
Object |
getData()
Gets the external data associated with this segment
|
Coordinate |
getEnd()
Gets the end coordinate of the segment
|
double |
getEndX()
Gets the end X ordinate of the segment
|
double |
getEndY()
Gets the end Y ordinate of the segment
|
double |
getEndZ()
Gets the end Z ordinate of the segment
|
LineSegment |
getLineSegment()
Gets a
LineSegment modelling this segment.
|
Coordinate |
getStart()
Gets the start coordinate of the segment
|
double |
getStartX()
Gets the start X ordinate of the segment
|
double |
getStartY()
Gets the start Y ordinate of the segment
|
double |
getStartZ()
Gets the start Z ordinate of the segment
|
Coordinate |
intersection(Segment
Computes the intersection point between this segment and another one.
|
void |
setData(Object
Sets the external data to be associated with this segment
|
String |
toString()
Computes a string representation of this segment.
|
public Segment(double x1,
double y1,
double z1,
double x2,
double y2,
double z2)
public Segment(double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
Object data)
public Segment(Coordinatep0, Coordinate p1, Object data)
p0 - the start point
p1 - the end point
data - an external data object
public Segment(Coordinatep0, Coordinate p1)
p0 - the start point
p1 - the end point
public CoordinategetStart()
public CoordinategetEnd()
public double getStartX()
public double getStartY()
public double getStartZ()
public double getEndX()
public double getEndY()
public double getEndZ()
public LineSegmentgetLineSegment()
public ObjectgetData()
public void setData(Objectdata)
data - a data object
public boolean equalsTopo(Segments)
s - a segment
public Coordinateintersection(Segment s)
s - a segment
null if there is none