public class Segment extends Object
| Constructor and Description |
|---|
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 data)
Creates a new instance for the given ordinates, with associated external data.
|
Segment(Point p0,
Point p1)
Creates a new instance for the given points.
|
Segment(Point p0,
Point p1,
Object data)
Creates a new instance for the given points, with associated external data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equalsTopo(Segment s)
Determines whether two segments are topologically equal.
|
Object |
getData()
Gets the external data associated with this segment
|
Point |
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 LineSegmentDouble modelling this segment.
|
Point |
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
|
Point |
intersection(Segment s)
Computes the intersection point between this segment and another one.
|
void |
setData(Object data)
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(Point p0, Point p1)
p0 - the start pointp1 - the end pointpublic boolean equalsTopo(Segment s)
s - a segmentpublic Object getData()
public Point getEnd()
public double getEndX()
public double getEndY()
public double getEndZ()
public LineSegment getLineSegment()
public Point getStart()
public double getStartX()
public double getStartY()
public double getStartZ()
public Point intersection(Segment s)
s - a segmentnull if there is nonepublic void setData(Object data)
data - a data objectCopyright © 2015 Revolution Systems Inc.. All rights reserved.